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
" perl: add 'use' statement for package name under the cursor | |
function! AddUse() | |
let line = line('.') | |
let col = col('.') | |
normal! yiw | |
let default = @0 | |
let package = input('Package? ', default) | |
if (search('^use\s\+'.package, 'bnw') == 0) | |
call search('^use\s\+', 'b') | |
put ='use ' . package . ';' |
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
3,5c3,5 | |
< Fuji | |
< Taka | |
< Nasubi | |
--- | |
> 1 Fuji | |
> 2 Taka | |
> 3 Nasubi | |
7,9c7,9 | |
< Sen |
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.Time | |
import System.Locale | |
main = getClockTime >>= | |
toCalendarTime >>= | |
putStrLn . formatCalendarTime defaultTimeLocale "%c" |
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
data ShellState = ShellState { | |
count :: Int | |
} | |
main = do | |
ls <- getContents | |
s <- return $ ShellState 0 |
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
static class ComposingTest | |
{ | |
static private bool Not(bool x) | |
{ | |
return !x; | |
} | |
static private bool Even(int x) | |
{ | |
return x % 2 == 0; |
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
Platform Mac, w meta, c = Close page, 1 | |
Platform Mac, w meta, c meta = Close page, 1 | |
Platform Mac, w meta, j = Focus page | |
Platform Mac, w meta, j meta = Focus page | |
Platform Mac, w meta, k = Focus address field | Focus message list | |
Platform Mac, w meta, k meta = Focus address field | Focus message list | |
Platform Mac, w meta, n = New page, 1 | |
Platform Mac, w meta, n meta = New page, 1 | |
Platform Mac, w meta, s = Duplicate page | |
Platform Mac, w meta, s meta = Duplicate page |
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 'rake' | |
require 'watchr' | |
file 'foo' => ['bar', 'baz'] do | |
sh 'cat bar baz >foo' | |
end | |
if self.instance_of? Watchr::Script::EvalContext then | |
watch /^(bar|baz)$/ do | |
sh 'rake -f rake_and_watchr.rb foo' |
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
file ',README.html' => 'README.html' do | |
sh 'sha1sum README.html >,README.html' | |
end | |
file 'README.html' => 'README.asciidoc' do | |
sh 'asciidoc -b xhtml11 README.asciidoc' | |
end | |
__END__ |
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
$ uname | |
Darwin | |
$ mount | |
/dev/disk0s2 on / (hfs, local, journaled) | |
devfs on /dev (devfs, local) | |
fdesc on /dev (fdesc, union) | |
map -hosts on /net (autofs, automounted) | |
map auto_home on /home (autofs, automounted) |
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
--- s.vim.before 2011-05-14 14:12:34.000000000 +0900 | |
+++ s.vim.after 2011-05-14 14:12:27.000000000 +0900 | |
@@ -21,7 +21,6 @@ | |
" Basic {{{ | |
-"set no compatible | |
set nocompatible | |
"reset |