Skip to content

Instantly share code, notes, and snippets.

@idesaku
idesaku / .screenrc
Created March 31, 2009 04:24
enviromnent settings.
escape ^Tt
hardstatus alwayslastline "[%Y-%m-%d %02c] %`%-w%{=b mw}%n %t%{-}%+w"
defscrollback 10000
startup_message off
@idesaku
idesaku / digest.groovy
Created March 31, 2009 06:31
Hex digest generator.
#!/usr/bin/env groovy
import java.security.MessageDigest
if(args.length < 1) {
System.err.println("usage: digest.groovy string [type]")
return
}
def src = args[0]
@idesaku
idesaku / Rakefile
Created June 2, 2009 04:40
リバースエンジニアリング用環境
require 'rake/clean'
DOC_DEST_DIR = 'doc'
SRC_DIR = 'src'
CONFIG = 'doxygen.config'
CLEAN.include DOC_DEST_DIR
directory DOC_DEST_DIR
@idesaku
idesaku / seq.rb
Created July 1, 2009 05:20
るびまゴルフ第6回に挑戦
eval"p *%d..%d"%gets.split(',')
@idesaku
idesaku / fibonacci.rb
Created July 8, 2009 15:02
100以下のフィボナッチ数を表示する
# 100以下のフィボナッチ数列を表示する。
# tap使いたいだけちゃうんかと。
puts [1,1].tap { |x|
loop do
v = x[-2] + x[-1]
break if v > 100
x << v
end
}
@idesaku
idesaku / Rakefile
Created July 15, 2009 04:01
grepモドキ
# rake grep[key,pattern]
target = FileList.new { |f|
f.exclude "**/*.swp"
}
desc "fake grep"
task :grep, [:key, :pattern] do |t,args|
args.with_defaults :pattern => "**/*"
@idesaku
idesaku / pre-commit
Created August 24, 2009 08:41
SVNリポジトリへのメッセージ無しのコミットを拒否するフックスクリプト
#!/bin/sh
# PRE-COMMIT HOOK
#
# The pre-commit hook is invoked before a Subversion txn is
# committed. Subversion runs this hook by invoking a program
# (script, executable, binary, etc.) named 'pre-commit' (for which
# this file is a template), with the following ordered arguments:
#
# [1] REPOS-PATH (the path to this repository)
@idesaku
idesaku / postgresql83.rb
Created September 27, 2011 11:40
PostgreSQL8.3がとりあえず入って動くFormula。caveats他コメント関係は編集していない。
require 'formula'
require 'hardware'
class Postgresql < Formula
homepage 'http://www.postgresql.org/'
url 'http://ftp9.us.postgresql.org/pub/mirrors/postgresql/source/v8.3.16/postgresql-8.3.16.tar.bz2'
md5 '92004b0494b646748a1f562cea7d695e'
depends_on 'readline'
depends_on 'libxml2' if MacOS.leopard? # Leopard libxml is too old
@idesaku
idesaku / gist:7540801
Last active December 28, 2015 18:09
bundle update automation helper Create a pull request if any updates are there.
#!/bin/sh
OWNER="owner name"
REPO="repo name"
OAUTH_TOKEN="your oauth token"
git checkout master
git pull --rebase
bundle update

Keybase proof

I hereby claim:

  • I am idesaku on github.
  • I am idesaku (https://keybase.io/idesaku) on keybase.
  • I have a public key ASC7o-_g_PgQAoZvojlo2Dxhr4hfvxdn-fxQrkcIKEkHgQo

To claim this, I am signing this object: