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
#!/usr/bin/env ruby | |
# -*- coding: utf-8 -*- | |
# | |
# git blog: generate blog template from git repository | |
# | |
# Usage: | |
# $ git blog > diary.txt | |
# | |
# and upload diary.txt by some methods. | |
# |
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
object Obj{ | |
type T = { | |
/** */ | |
def f : Unit | |
} | |
} |
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
(require 'auto-complete) | |
(defvar ac-coq-sources | |
'(ac-source-coq-tactics | |
ac-source-coq-command | |
ac-source-coq-keyword)) | |
(ac-define-dictionary-source | |
ac-source-coq-keyword | |
'("as" |
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
(require 'auto-complete) | |
(defvar ac-coq-sources | |
'(ac-source-coq-tactics | |
ac-source-coq-command | |
ac-source-coq-keyword)) | |
(ac-define-dictionary-source | |
ac-source-coq-keyword | |
'("as" |
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
import System | |
import Data.List | |
main = getArgs >>= (return . concat . intersperse " ") >>= putStrLn |
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
#!/usr/bin/env ruby | |
require 'ostruct' | |
require 'rubygems' | |
require 'net/http' | |
require 'yaml' | |
require 'pit' | |
class Hash | |
def to_url_params | |
elements = [] |
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
type_ = [("d","42"), | |
("s","\"fish\"")] | |
flag = ["-","+",""] | |
gen = do f <- flag | |
(t,arg) <- type_ | |
return $ "printf(\"%" ++ f ++ t ++ "\","++ arg ++ ")" |
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
tell application "Alloy4" to activate | |
tell application "System Events" | |
tell process "Alloy 4" | |
tell menu bar 1 | |
tell menu "File" | |
click menu item "Reload all" | |
end tell | |
tell menu "Execute" |
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
-- alloy 4( http://alloy.mit.edu/alloy4/ )でコードをリロードして、解析をExecuteするAppleScript | |
-- emacsの場合は: | |
-- | |
-- (defun alloy-execute () | |
-- (interactive) | |
-- (shell-command "osascript /path/to/alloy-execute.scpt &")) | |
-- (define-key alloy-mode-map "\C-cr" 'alloy-execute) | |
-- | |
-- とするといい感じかも。 | |
-- GUI操作部分は、http://d.hatena.ne.jp/zariganitosh/20090218/1235019896のコードを利用した。 |
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
(define-rule source-character (annot "any character in ISO/IEC 646")) | |
(define-rule line-terminator (seq (opt (ascii "0x0d")) (ascii "0x0a"))) | |
(define-rule separator (or (lit ";") (annot "''line-terminator'' here"))) | |
(define-rule single-variable-assignment-expression (seq (seq (seq variable (annot "no ''line-terminator'' here")) (lit "=")) operator-expression)) | |
(define-rule whitespace (or (ascii "0x09") (or (ascii "0x0b") (or (ascii "0x0c") (or (ascii "0x0d") (or (ascii "0x20") (seq (seq (lit "\") (opt (ascii "0x0d"))) (ascii "0x0a")))))))) | |
(define-rule comment (or single-line-comment multi-line-comment)) | |
(define-rule single-line-comment (seq (lit "#") (opt comment-content))) | |
(define-rule comment-content line-content) | |
(define-rule line-content (many-1 source-character)) | |
(define-rule multi-line-comment (seq (seq multi-line-comment-begin-line (opt multi-line-comment-line)) multi-line-comment-end-line)) |