This file contains hidden or 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
# Recursively diff two hashes, showing only the differing values. | |
# By Henrik Nyh <http://henrik.nyh.se> 2009-07-14 under the MIT license. | |
# | |
# Example: | |
# | |
# a = { | |
# "same" => "same", | |
# "diff" => "a", | |
# "only a" => "a", | |
# "nest" => { |
This file contains hidden or 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
;; need Revision 1.178 2009/04/20 16:18:58 or higher | |
(setq anything-display-function | |
(lambda (b) | |
(delete-other-windows) | |
(split-window-horizontally) | |
(pop-to-buffer b))) |
This file contains hidden or 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
# | |
# Show branch name in Zsh's right prompt | |
# | |
autoload -Uz VCS_INFO_get_data_git; VCS_INFO_get_data_git 2> /dev/null | |
setopt prompt_subst | |
function rprompt-git-current-branch { | |
local name st color gitdir action |
This file contains hidden or 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
# Drop this file in config/initializers to run your Rails project on Ruby 1.9. | |
# This is three separate monkey patches -- see comments in code below for the source of each. | |
# None of them are original to me, I just put them in one file for easily dropping into my Rails projects. | |
# Also see original sources for pros and cons of each patch. Most notably, the MySQL patch just assumes | |
# that everything in your database is stored as UTF-8. This was true for me, and there's a good chance it's | |
# true for you too, in which case this is a quick, practical solution to get you up and running on Ruby 1.9. | |
# | |
# Andre Lewis 1/2010 | |
# encoding: utf-8 |
This file contains hidden or 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
# 1. Download git and make gitweb/gitweb.cgi (See gitweb/INSTALL how to set gitweb root etc.) | |
# 2. Copy this file as gitweb/app.psgi | |
# 3. cd gitweb; plackup | |
# 4. Access http://localhost:3000/gitweb.cgi | |
use Plack::Builder; | |
use Plack::App::WrapCGI; | |
use Plack::App::File; | |
builder { |
This file contains hidden or 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
// See comments below. | |
// This code sample and justification brought to you by | |
// Isaac Z. Schlueter, aka isaacs | |
// standard style | |
var a = "ape", | |
b = "bat", | |
c = "cat", | |
d = "dog", |
This file contains hidden or 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
落書きの報告書 Twitterばかりしてる俺 | |
超高速でビルドするけど 動かないVirtual Machine | |
やさしくないJavaの本ページ破りたい | |
Chromeの裏 2ちゃんを覗いて見つかれば逃げ場もない | |
座って固まり 目を伏せながら | |
心のひとつも解りあえないプログラムをにらむ | |
そして仲間たちは今夜辞職の計画をたてる | |
とにかくもう 会社や家には帰りたくない | |
自分の業務が何なのかさえ 解らず震えている | |
25の夜 |
This file contains hidden or 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
あたし大卒やのにね 仕事をもらわれへんのやと書いた | |
マスターの手紙の文字は とがりながらふるえている | |
ヲタのくせにと足を切られ 学生たちの眼が年をとる | |
虚しさを握りしめ過ぎた 日々の中夢が崩れ去る | |
私 本当は目撃したんです 昨日大手企業の 面接で | |
五秒で落ちたヲタクと 学歴だけで受かった奴らの薄笑い | |
私 驚いてしまって 助けもせず叫びもしなかった | |
ただ恐くて逃げました 私の敵は すべてです |
This file contains hidden or 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
if Rails.version == '2.3.8' && Gem.available?('mongrel', Gem::Requirement.new('~>1.1.5')) && self.class.const_defined?(:Mongrel) | |
# Pulled right from latest rack. Old looked like this in 1.1.0 version. | |
# | |
# def [](k) | |
# super(@names[k] ||= @names[k.downcase]) | |
# end | |
# | |
module Rack |
OlderNewer