Skip to content

Instantly share code, notes, and snippets.

@valvallow
valvallow / baroque.scm
Last active December 14, 2015 03:09 — forked from ayato-p/baroque.scm
コマンドにしてみた。
#!/usr/bin/gosh
;; baroque
(use gauche.parseopt)
(use srfi-1) ; circular-list
;;
;; solver
;;
@valvallow
valvallow / wol-local.sh
Created June 30, 2012 00:15 — forked from aharisu/wol.scm
Wake-on-LANのマジックパケットを投げつけるだけ
#!/bin/sh
ssh -i /home/valvallow/.ssh/kaisha/id_rsa valvallow@kaisha-no-server '~/wol-srv.sh'
(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 ...)))))
(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 ...)))))
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);
}
}
div.section .gist .gist-file .gist-data pre{
font-family: consolas, monospace, sans-serif !important;
-moz-border-radius: 8px;
-moz-border-radius-bottomleft: 0;
-moz-border-radius-bottomright: 0;
-webkit-border-radius: 8px;
-webkit-border-bottom-left-radius: 0;
-webkit-border-bottom-right-radius: 0;
overflow: auto !important;
color: #c2c2c2;
@valvallow
valvallow / gist:639535
Created October 21, 2010 22:54 — forked from kikuchan/gist:638160
sudoku, kikuchan, gauche
(use srfi-1) ; iota
(use srfi-43) ; vector-for-each
(define fail #f)
;;; write following at the end of file
;;; to initialize the value of the fail.
(call/cc
(lambda (cc)
(set! fail