Scripts to run specific services
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 ([email protected]) | |
* Contributors:Francesco Verheye ([email protected]) | |
* Israel Dominguez ([email protected]) | |
*/ | |
import java.util.ArrayList; | |
import java.util.List; | |
import java.util.concurrent.atomic.AtomicBoolean; | |
import android.os.Handler; |
This file contains hidden or 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 hidden or 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 | |
} | |
############################ |