Skip to content

Instantly share code, notes, and snippets.

View ganta's full-sized avatar
🐤

Hideki Igarashi ganta

🐤
View GitHub Profile
@ganta
ganta / gvm.plugin.zsh
Last active December 12, 2015 01:08 — forked from kiy0taka/gist:4387787
Modified to follow symbolic links.
__gvm_switch() {
if [ -s "application.properties" ]; then
local arr candidate candidate_home current target
arr=($(cat application.properties | grep --color=never 'app.\(grails\|griffon\).version' | sed "s_app.\(.*\).version=\(.*\)_\1 \2_g"))
candidate=${arr[1]}
target=${arr[2]}
candidate_home=$(eval echo '$'$(echo $candidate | tr '[:lower:]' '[:upper:]')_HOME)
if [ ! -z "$(readlink $candidate_home)" ]; then
candidate_home=$(readlink $candidate_home)
fi
@ganta
ganta / production.rb
Created July 8, 2012 11:37
Unicorn init.d script with support for different rbenv gemsets
# RAILS_ROOT/config/unicorn.rb
# Search for "# SET ME!" and replace these with your own settings!.
HOW_DEEP_WE_R_FROM_RAILS_ROOT = "../.."
# Set environment to development unless something else is specified
RAILS_ROOT = File.expand_path(HOW_DEEP_WE_R_FROM_RAILS_ROOT, File.dirname(__FILE__))
SHARED_PATH = File.expand_path('../shared', RAILS_ROOT)
ENV['BUNDLE_GEMFILE'] = File.expand_path("#{HOW_DEEP_WE_R_FROM_RAILS_ROOT}/Gemfile", File.dirname(__FILE__))
@ganta
ganta / patch-for-emacs-inline.patch
Created June 13, 2012 15:13 — forked from n-miyo/gist:1250669
patch for emacs-inline.patch: Use preferredLanguages instead of currentLocale. (Deal with Emacs 24.1)
*** a/src/macim.m 2012-06-12 13:09:43.000000000 +0900
--- b/src/macim.m 2012-06-12 13:11:47.000000000 +0900
***************
*** 99,105 ****
}
else
{
! NSString *locale = [[NSLocale currentLocale] localeIdentifier];
is = TISCopyInputSourceForLanguage((CFStringRef)locale);
}