Skip to content

Instantly share code, notes, and snippets.

View joker1007's full-sized avatar

Tomohiro Hashidate joker1007

View GitHub Profile
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileWriter;
import java.io.FilenameFilter;
import java.io.IOException;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.dom4j.Document;
import org.dom4j.DocumentHelper;
import java.io.File;
import java.io.IOException;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.apache.poi.POITextExtractor;
import org.apache.poi.extractor.ExtractorFactory;
import org.apache.poi.openxml4j.exceptions.InvalidFormatException;
import org.apache.poi.openxml4j.exceptions.OpenXML4JException;
import org.apache.xmlbeans.XmlException;
# Copy database.yml
run "cp config/database.yml config/database.sample.yml"
# Delete unnecessary files
run "rm README"
run "rm public/index.html"
# Set up git
git :init
git :add => '.'
@joker1007
joker1007 / rails3-rspec-template.rb
Created September 2, 2010 07:55
rails3-template use Rspec
# rails3-rspec-template
#
# using:
# haml
# rspec
# cucumber
# guard
# spork
# Hack around bug in Rspec when not using AR
module RSpec
module Rails
module TransactionalDatabaseSupport
def active_record_configured?
false
end
end
end
end
require "autotest/growl"
require "ruby_gntp"
module Autotest::Growl
@@growl_for_win = ::GNTP.new("Rails Autotest", "192.168.1.5")
@@growl_for_win.register({
:notifications => [
{
:name => "passed",
:enabled => true,
require "rubygems"
require "trollop"
require "ruby_gntp"
opts = Trollop::options do
opt :name, "Notification Name", :default => "growlnotify"
opt :host, "Target Host", :short => "-H", :default => "localhost"
opt :password, "Growl password", :type => :string
opt :image, "Icon file", :type => :string
opt :message, "Notification body", :type => :string, :required => true
vmstat 1 | while read LINE; do echo `date +%H:%M:%S` $LINE; done
# vim: ft=sh
#!/bin/sh
# cd
cd /var/tmp
# 環境変数
ORACLE_HOME=*******
ORACLE_SID=********
NLS_LANG=*******
(pwdLastSet/10000000)-11644506000