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
# Rack middleware to insert git commit id into http response header | |
# For Rails, put this script under RAILS_ROOT/config/initializers | |
module Rack | |
class GitCommitHeader | |
def initialize(app) | |
@app = app | |
c = `git rev-parse HEAD`.chomp | |
@commit = (c =~ /^[0-9a-f]{40}$/) ? c : nil | |
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
" Vim color file | |
" Name: h2u_black | |
" Maintainer: Kyo Nagashima <[email protected]> | |
" URL: http://hail2u.net/ | |
" Version: 12.4.21 | |
" License: http://hail2u.mit-license.org/2010 | |
set background=dark |
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 perl | |
use strict; | |
use warnings; | |
use Pod::Usage; | |
use Text::Markdown 'markdown'; | |
use HTML::TreeBuilder; | |
use List::Util 'max'; |
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 World Conference 2010行ったんです。RWC2010。 | |
そしたらなんか言ってることがめちゃくちゃ偏ってて聞いてられないんです。 | |
で、よく見たらなんかスライド出てて | |
「期間、予算の都合からJavaに関しては実際に物を作ってのデータとりを行わず、 | |
論理的な見積り値の算出にとどめた。見積り値の算出は富士通のファンクションスケール法」 | |
とか書いてあるんです。 | |
もうね、アホかと。馬鹿かと。 | |
お前らな、自社基準の想像上の生産性と比較して検証とかいってんじゃねーよ、ボケが。 | |
論理的な見積り値だよ、論理的な見積り値。 | |
なんかWeb初心者いるし。HTMLやJSに苦戦か。たいへんだな。 |
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
#!/bin/bash | |
for path in /usr/src/linux-*; do | |
version=${path#*/linux-} | |
if qfile $path > /dev/null; then | |
echo "$version: skip" | |
else | |
echo "$version: removing" | |
cmd="rm -rf $path /lib/modules/$version /boot/*-$version /boot/*-$version.old" |
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 'rspec' | |
require 'rr' | |
module RR | |
module Adapters | |
module Rspec | |
def self.included(mod) | |
RSpec.configuration.backtrace_clean_patterns.push(RR::Errors::BACKTRACE_IDENTIFIER) | |
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
0% jruby -rubygems trouble/twitter/twitter4j.rb | |
Rehearsal ----------------------------------------------- | |
twitter gem 5.856000 0.000000 5.856000 ( 5.856000) | |
rubytter 5.844000 0.000000 5.844000 ( 5.845000) | |
twitter4j 1.730000 0.000000 1.730000 ( 1.730000) | |
------------------------------------- total: 13.430000sec | |
user system total real | |
twitter gem 4.850000 0.000000 4.850000 ( 4.850000) | |
rubytter 5.110000 0.000000 5.110000 ( 5.111000) |
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
snippet describe | |
abbr describe DESC do before do end end | |
describe '${1:DESC}' do | |
before do | |
${2} | |
end | |
end | |
snippet RS::M | |
abbr RSpec::Matcher.define |
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 'socket' | |
class RubyIrcClient | |
def initialize(server = 'irc.freenode.net', port = 6667) | |
@server = server | |
@port = port | |
@socket= TCPSocket.new(@server, @port) | |
end | |
def login | |
nick('ukstudio_test'). |
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
repo for a more modern version of qt (4.7) | |
http://atrpms.net/documentation/install/ | |
http://packages.atrpms.net/dist/el5/qt4/ | |
cat /etc/yum.repos.d/atrpms.repo | |
[atrpms] | |
name=ATrpms manual | |
baseurl=http://dl.atrpms.net/el5-$basearch/atrpms/testing/ | |
gpgkey=http://ATrpms.net/RPM-GPG-KEY.atrpms |
OlderNewer