Scripts to run specific services
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = { | |
printWidth: 120, // max 120 chars in line, code is easy to read | |
useTabs: false, // use spaces instead of tabs | |
tabWidth: 2, // "visual width" of of the "tab" | |
trailingComma: 'es5', // add trailing commas in objects, arrays, etc. | |
semi: true, // add ; when needed | |
singleQuote: true, // '' for stings instead of "" | |
bracketSpacing: true, // import { some } ... instead of import {some} ... | |
arrowParens: 'always', // braces even for single param in arrow functions (a) => { } | |
jsxSingleQuote: false, // "" for react props, like in html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Functional parsing library from chapter 8 of Programming in Haskell, | |
Graham Hutton, Cambridge University Press, 2007. | |
> module Parsing where | |
> | |
> | |
> import Data.Char | |
> import Control.Monad | |
> import qualified Control.Applicative as CA |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# PATH TO YOUR HOSTS FILE | |
ETC_HOSTS=/etc/hosts | |
# DEFAULT IP FOR HOSTNAME | |
IP="127.0.0.1" | |
# Hostname to add/remove. | |
HOSTNAME=$1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Author: Felipe Herranz (felhr85@gmail.com) | |
* Contributors:Francesco Verheye (verheye.francesco@gmail.com) | |
* Israel Dominguez (dominguez.israel@gmail.com) | |
*/ | |
import java.util.ArrayList; | |
import java.util.List; | |
import java.util.concurrent.atomic.AtomicBoolean; | |
import android.os.Handler; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// 비대칭 알고리듬인 RSA를 사용하여 문자열을 암호화하는 법. | |
// 개인키 비밀번호는 암호화할 때는 필요없고 복호화할 때만 입력하면 되므로 | |
// 서버에 저장할 필요 없이 그때그때 관리자가 입력하도록 해도 된다. | |
// PHP 5.2 이상, openssl 모듈이 필요하다. | |
// RSA 개인키, 공개키 조합을 생성한다. | |
// 키 생성에는 시간이 많이 걸리므로, 한 번만 생성하여 저장해 두고 사용하면 된다. | |
// 단, 비밀번호는 개인키를 사용할 때마다 필요하다. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
############################ | |
#script function | |
############################ | |
setProperty(){ | |
awk -v pat="^$1=" -v value="$1=$2" '{ if ($0 ~ pat) print value; else print $0; }' $3 > $3.tmp | |
mv $3.tmp $3 | |
} | |
############################ |