Skip to content

Instantly share code, notes, and snippets.

Avatar
🐤

Hideki Igarashi ganta

🐤
  • Cybozu, Inc.
  • Japan
  • 04:02 (UTC +09:00)
  • Twitter @ganta0087
View GitHub Profile
@ganta
ganta / gvm.plugin.zsh
Last active Dec 12, 2015 — forked from kiy0taka/gist:4387787
Modified to follow symbolic links.
View gvm.plugin.zsh
__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 Jul 8, 2012
Unicorn init.d script with support for different rbenv gemsets
View production.rb
# 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 Jun 13, 2012 — forked from n-miyo/gist:1250669
patch for emacs-inline.patch: Use preferredLanguages instead of currentLocale. (Deal with Emacs 24.1)
View patch-for-emacs-inline.patch
*** 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);
}