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 | |
| ssh -i /home/valvallow/.ssh/kaisha/id_rsa valvallow@kaisha-no-server '~/wol-srv.sh' |
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 | |
| DEVENV_PATH="/cygdrive/c/Program Files (x86)/Microsoft Visual Studio 10.0/Common7/IDE/devenv.com" | |
| # get last argument | |
| SLN_PATH=`eval echo '$'{$#}` | |
| SLN_PATH_DOS=`cygpath -d "$SLN_PATH"` | |
| "$DEVENV_PATH" ${@:1:`expr $# - 1`} "$SLN_PATH_DOS" | nkf |
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
| void example() { | |
| var b = Expr<bool>(() => { | |
| switch (1) { | |
| case 1: return true; | |
| default: return false; | |
| } | |
| }); | |
| } |
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
| ;; huffman encoding tree | |
| (define (make-leaf symbol weight) | |
| (list 'leaf symbol weight)) | |
| (define (leaf? object) | |
| (eq? (car object) 'leaf)) | |
| (define (symbol-leaf x) | |
| (cadr x)) |
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
| (use gauche.generator) | |
| (use gauche.lazy) | |
| (define-syntax chain | |
| (syntax-rules () | |
| ((_ ls (p1 p2)) (p1 p2 ls)) | |
| ((_ ls (p1 p2) x ...) | |
| (begin (chain ls (p1 p2)) | |
| (chain ls x ...))))) |
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
| (use gauche.generator) | |
| (use gauche.lazy) | |
| (define-syntax chain | |
| (syntax-rules () | |
| ((_ ls proc)(proc ls)) | |
| ((_ ls proc x ...) | |
| (begin (chain ls proc) | |
| (chain ls x ...))))) |
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
| public static class Values { | |
| public static void Receive<T1, T2>(this Tuple<T1, T2> tuple, out T1 item1, out T2 item2) { | |
| item1 = tuple.Item1; | |
| item2 = tuple.Item2; | |
| } | |
| public static void CallWith<T1, T2>(this Tuple<T1, T2> tuple, Action<T1, T2> func) { | |
| func(tuple.Item1, tuple.Item2); | |
| } | |
| } |
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 | |
| MASK_TEXT_URL='http://nami.jp/ipv4bycc/mask.txt.gz' | |
| WORKDIR=`mktemp -d` | |
| cd $WORKDIR | |
| wget "$MASK_TEXT_URL" 2> /dev/null > /dev/null | |
| if [ $? -ne 0 ]; then | |
| exit 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
| #!/usr/local/bin/gosh | |
| (use srfi-1) | |
| (use text.csv) | |
| (use file.util) | |
| (use util.list) | |
| (use gauche.parseopt) | |
| (define (usage) | |
| (print "Usage: csv2sql [options ...] <csv-file>") |
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 | |
| # http://dokonoumanohone.blog47.fc2.com/blog-entry-2.html | |
| for ARG in "$@" | |
| do | |
| echo $(cd $(dirname "$ARG") && pwd)/$(basename "$ARG") | |
| done |