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
kintsuba_sweets: | |
hosted_by_en: 'Kintsuba Sweets (#kintsuba)' | |
hosted_by_ja: 'きんつばスイーツの会 (#kintsuba)' | |
name_en: 'Kintsuba Sweets' | |
name_ja: 'きんつばスイーツの会' | |
dtstart: '2011-07-02 13:30' | |
dtend: '2011-07-02 17:30' | |
url: 'https://gist.github.com/1043321' | |
location: 'Seika-cho, Kyoto, JAPAN' |
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
# -*- ruby -*- | |
require 'rubygems' | |
require 'irb/completion' | |
IRB.conf[:SAVE_HISTORY] = 65535 | |
IRB.conf[:AUTO_INDENT] = true | |
def ri(keywd = '') | |
print `ri #{keywd}` | |
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
(defvar rbenv-home (concat (getenv "HOME") "/.rbenv") | |
"Directory of rbenv home.") | |
(defvar rbenv-version-dir (concat rbenv-home "/versions") | |
"Directory of rbenv versions.") | |
(defvar rbenv-versions (directory-files rbenv-version-dir nil "^[0-9a-zA-Z_]") | |
"rbenv versions") | |
(defun rbenv (&optional version) | |
"rbenv shell" | |
(interactive) |
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
(setq skk-rom-kana-rule-list | |
'(("hh" "h" ("ッ" . "っ")) | |
("mm" "m" ("ン" . "ん")) | |
(";" nil (";" . ";")) | |
(":" nil (":" . ":")) | |
("?" nil ("?" . "?")))) |
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 Person; end | |
obj = Person.new | |
# => #<Person:0x0000010104a108> | |
obj.class # => Person | |
Person.ancestors | |
# => [Person, Object, PP::ObjectMixin, Kernel, BasicObject] |
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; -*- | |
# Ruby初級者向けレッスン KOF出張版 | |
# 演習問題 1 | |
# 正規表現を使って <a href="...">...</a> から URL とテキストを抜き出す例 | |
# %r 記法を使うと、正規表現リテラルの開始・終了文字を自由に選べます。 | |
# 以下では | を使用しています。 |
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; -*- | |
# Ruby初級者向けレッスン KOF出張版 | |
# 演習問題 1 | |
# Nokogiri を使って <a href="...">...</a> から URL とテキストを抜き出す例 | |
# id="wiki-body" 内のみ処理する。 | |
require 'nokogiri' |
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; -*- | |
RUBY_DESCRIPTION # => "ruby 1.9.3p385 (2013-02-06 revision 39114) [x86_64-darwin10.8.0]" | |
# 0 から 9 までの数値をもつ配列 a がある。 | |
a = (0..9).to_a # => [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] | |
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; -*- | |
RUBY_DESCRIPTION # => "ruby 1.9.3p385 (2013-02-06 revision 39114) [x86_64-darwin10.8.0]" | |
# 0 から 9 までの数値をもつ配列 a がある。 | |
a = (0..9).to_a # => [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] | |
OlderNewer