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
diff -r 8045199a28c0 views/index.haml | |
--- a/views/index.haml Tue Jun 08 21:43:26 2010 +0900 | |
+++ b/views/index.haml Wed Jun 09 18:58:22 2010 +0900 | |
@@ -76,6 +76,9 @@ | |
%dt 2010-05-17 | |
%dd <a href="http://help-me-hackers.com/">Help me, hackers!</a> - komagata, machida | |
+ %dt 2010-06-09 | |
+ %dd <a href="http://hamcutlet.fjord.jp/">Ham Cutlet</a> - komagata, machida | |
+ |
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
#!/bin/sh | |
wget "http://hamcutlet.fjord.jp/?url=$1" -O - |
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
【あ】:あまり調子に乗ってると裏世界でひっそり幕を閉じる | |
% | |
【い】:今のがリアルでなくて良かったな、リアルだったらお前はもう死んでるぞ | |
% | |
【う】:うるさい、気が散る。一瞬の油断が命取り | |
% | |
【え】:FFではナイトだがリアルではモンクタイプだからな | |
% | |
【お】:おれの怒りが有頂天になった | |
% |
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
#include <stdio.h> | |
#include <stdlib.h> | |
int main(int argc, char *argv[]) { | |
char cmd[] = "ruby -e \"puts 'ruby!'\""; | |
system(cmd); | |
return 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
require 'rubygems' | |
require 'dm-core' | |
require 'dm-migrations' | |
require 'dm-validations' | |
require 'dm-validations-i18n' | |
DataMapper.setup(:default, 'sqlite::memory:') | |
class Employee | |
include DataMapper::Resource |
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
class Foo | |
@@foo = 'foo!' | |
end | |
puts Foo.send(:class_variable_get, '@@foo') # 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
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'sinatra' | |
enable :run | |
get '/' do | |
'<form method="post"><input type="text" name="foo" /></form>' | |
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
#!/usr/bin/env ruby | |
def shell(cmd) | |
puts cmd | |
system cmd | |
end | |
# homebrew | |
shell "sudo ruby -e \"$(curl -fsS http://gist.github.com/raw/323731/install_homebrew.rb)\"" |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Test Site</title> | |
</head> | |
<body> | |
<script type="text/javascript"> | |
window.onpopstate = function(event) { | |
alert('popstate'); | |
}; |
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 | |
to = ARGV[0] | |
body = ARGV[1] | |
length = 30 | |
subject = body.split(//u)[0, length].to_s | |
IO.popen("mail -s '#{subject}' #{to}", 'r+') {|io| io.puts body } |