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 M | |
def foo | |
puts "foo!" | |
end | |
end | |
class C | |
def eigen_class | |
class << self; self 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
#!/usr/bin/env ruby | |
unless ARGV.size == 1 | |
puts "specify screenname!" | |
exit 1 | |
end | |
username = ARGV.shift | |
url = "http://api.twitter.com/1/users/profile_image/#{username}.json?size=bigger" | |
require 'open-uri' | |
img = open(url).read |
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
# encoding: utf-8 | |
# from: http://ukstudio.jp/2009/05/11/cucumber_email_spec_for_action_mailer/ | |
Given /^(?:すべてのメールをクリアする|メールボックスが空になっている)$/ do | |
reset_mailer | |
end | |
# Use this step to open the most recently sent e-mail. | |
When /^メールを開く$/ do |
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 M | |
module Q | |
NESTING1 = Module.nesting | |
end | |
end | |
module M::Q | |
NESTING2 = Module.nesting | |
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
--- a/src/wordbuf.c 2011-08-15 02:57:05.000000000 +0900 | |
+++ b/src/wordbuf.c 2011-08-15 02:57:17.000000000 +0900 | |
@@ -9,6 +9,7 @@ | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
+#include <limits.h> | |
#include "wordbuf.h" | |
#define WORDLEN_DEF 64 |
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/local/rvm/gems/ruby-1.9.2-p290/gems/docdiff-0.4.0/Makefile | |
/usr/local/rvm/gems/ruby-1.9.2-p290/gems/docdiff-0.4.0/devutil/JIS0208.TXT | |
/usr/local/rvm/gems/ruby-1.9.2-p290/gems/docdiff-0.4.0/devutil/char_by_charclass.rb | |
/usr/local/rvm/gems/ruby-1.9.2-p290/gems/docdiff-0.4.0/devutil/charclass_by_char.rb | |
/usr/local/rvm/gems/ruby-1.9.2-p290/gems/docdiff-0.4.0/devutil/jis0208.rb | |
/usr/local/rvm/gems/ruby-1.9.2-p290/gems/docdiff-0.4.0/devutil/testjis0208.rb | |
/usr/local/rvm/gems/ruby-1.9.2-p290/gems/docdiff-0.4.0/docdiff.conf.example | |
/usr/local/rvm/gems/ruby-1.9.2-p290/gems/docdiff-0.4.0/docdiff.gemspec | |
/usr/local/rvm/gems/ruby-1.9.2-p290/gems/docdiff-0.4.0/docdiff.rb | |
/usr/local/rvm/gems/ruby-1.9.2-p290/gems/docdiff-0.4.0/docdiff/charstring.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
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'pit' | |
require 'mechanize' | |
require 'logger' | |
require 'uri' | |
require 'fileutils' | |
MY_DROPBOX_BASE="/path/to/your/dropbox/folder" | |
BASE_URL = 'https://esrv.org/jtrapja' |
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
# -*- coding: utf-8 -*- | |
module Iso2022jpEnforcer | |
extend ActiveSupport::Concern | |
included do | |
default :charset => 'iso-2022-jp' | |
alias_method_chain :mail, :iso_2022_jp | |
end | |
module ClassMethods |
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 Depot | |
class EmailNotifier < Bluepill::Trigger | |
def initialize(process, options = {}) | |
@to_address = options.delete(:to_address) | |
@from_address = options.delete(:from_address) | |
@notify_on = options.delete(:notify_on) | |
@rails_env = options.delete(:rails_env) | |
super | |
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
require 'formula' | |
class Cairo <Formula | |
url 'http://cairographics.org/releases/cairo-1.8.10.tar.gz' | |
homepage 'http://cairographics.org/' | |
md5 'b60a82f405f9400bbfdcf850b1728d25' | |
depends_on 'pkg-config' => :build | |
depends_on 'libpng' | |
depends_on 'pixman' |