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 lang="ja"> | |
<head> | |
<meta charset="UTF-8" /> | |
<title>sample</title> | |
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script> | |
<script type="text/javascript" src="jquery.extra_http_methods.js"></script> | |
</head> | |
<body> | |
<p>jquery.extra_http_methods.jsは https://gist.github.com/803951 にありますよ</p> |
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
rnew () { | |
rails new $* | |
cd $1 | |
git init | |
git add . | |
git commit -am "initial commit" | |
} |
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
module CustomFileMatchers | |
# | |
# 1つのマッチャを処理するためのクラス | |
# | |
class MoveFile | |
def initialize(src, dest) | |
@src = src | |
@dest = dest | |
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
$(function() { | |
var log = (function() { | |
var textarea = $("textarea#log"); | |
return function(text) { | |
textarea.val( | |
text + "\n" + textarea.val() | |
); | |
} | |
})(); |
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 | |
class String | |
def color num | |
"\e[#{num}m#{self}\e[0m" | |
end | |
def ask | |
print "#{self}" |
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 lang="ja"> | |
<head> | |
<meta charset="UTF-8" /> | |
<title>縦書きにチャレンジ</title> | |
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js"></script> | |
<script type="text/javascript" src="http://masonry.desandro.com/jquery.masonry.min.js"></script> | |
<script type="text/javascript"> | |
$(function(){ | |
$('#container').masonry({ |
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
# ~/.bundle/config | |
--- | |
BUNDLE_BUILD__MYSQL: --with-mysql-config=/usr/local/mysql/bin/mysql_config |
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 | |
# | |
# original: | |
# http://blog.sakatam.net/2009/06/ruby-memcache-client-extension-for-item-listing/ | |
# | |
require 'rubygems' | |
require 'memcache' | |
# dump all items |
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 "active_record/railtie" | |
require "action_controller/railtie" | |
require "action_mailer/railtie" | |
require "active_resource/railtie" | |
require "rails/test_unit/railtie" |
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
curl get.pow.cx | sh | |
bash < <(curl -s https://rvm.beginrescueend.com/install/rvm) | |
echo '[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # Load RVM function' >> ~/.bash_profile | |
source ~/.bash_profile | |
echo 'export rvm_archflags="-arch x86_64"' >> ~/.rvmrc | |
rvm pkg install readline | |
rvm pkg install openssl | |
rvm pkg install zlib |