Skip to content

Instantly share code, notes, and snippets.

@namespace url(http://www.w3.org/1999/xhtml);
@-moz-document domain("workingnews.blog117.fc2.com") {
.thread dd em{ font-family: "IPA モナー Pゴシック" !important ; }
}
@-moz-document domain("mudainodqnment.blog35.fc2.com") {
.article { font-family: "IPA モナー Pゴシック" !important ; }
}
#!/usr/bin/env ruby
# vim:set fileencoding=utf-8 filetype=ruby
$KCODE = 'u'
require 'rubygems'
require 'csv'
require 'vpim/vcard'
data = Vpim::Vcard.decode(ARGF).map do |vcard|
next unless addr = vcard.address
require 'rubygems'
require 'active_record'
require 'active_record/fixtures'
RAILS_ENV = "test"
module RecrodExtention
module TestUtil
MEMORY_DB_OPTIONS = {
:adapter => "sqlite3",
#!/usr/bin/env ruby19
require 'net/http'
require 'webrick/cookie'
require 'cgi'
require 'uri'
Net::HTTP.version_1_1
def space
From 11de51c1dce437ecee39660fcceb4bfece6c6d7c Mon Sep 17 00:00:00 2001
From: moro <[email protected]>
Date: Wed, 25 Feb 2009 18:30:21 +0900
Subject: [PATCH] dynamic scope should also be available from method chain.
---
activerecord/lib/active_record/base.rb | 11 +----------
.../lib/active_record/dynamic_scope_match.rb | 13 +++++++++++++
activerecord/lib/active_record/named_scope.rb | 5 +++++
3 files changed, 19 insertions(+), 10 deletions(-)
#!/usr/bin/env ruby
# vim:set fileencoding=utf-8 filetype=ruby
$KCODE = 'u'
require 'rubygems'
require 'logger'
def log_exception(logger, message)
raise "Catch me."
rescue Exception => why
#!/usr/bin/env ruby
# vim:set fileencoding=utf-8 filetype=ruby
$KCODE = 'u'
require 'rubygems'
require 'nokogiri'
p (Nokogiri::HTML(<<-HTML) / "input[type=password][name='kondo[shuuhei]']").attr("value")
<html><head></head><body>
<form action="hoge">
#!/usr/bin/env ruby
# vim:set fileencoding=utf-8 filetype=ruby
$KCODE = 'u'
require 'rubygems'
require 'nokogiri'
p (Nokogiri::HTML(<<-HTML) / "input[type=password][name='kondo[shuuhei]']").attr("value")
<html><head></head><body>
<form action="hoge">
require 'pathname'
path = "/Users/home/moro/work/xxx/spec/fixtures/me.png"
re = /^.*#{File::SEPARATOR}([^#{File::SEPARATOR}]+)$/
p Pathname.new(path).sub(re){ $1 }
p Pathname.new( Pathname.new(path).instance_variable_get("@path").dup.sub(re){ $1 } )
#!/bin/sh
#
# $Id: skeleton.sh 1 2005-07-26 14:04:19Z moro $
#
git --version
mkdir git-test-dir
cd git-test-dir
git init