Skip to content

Instantly share code, notes, and snippets.

Avatar
🐤

Hideki Igarashi ganta

🐤
  • Cybozu, Inc.
  • Japan
  • 00:36 (UTC +09:00)
  • Twitter @ganta0087
View GitHub Profile
@ganta
ganta / subversion.rb
Created May 25, 2012 16:04
HomeBrew's Formula for Subversion with UTF-8 Path patch and update version to 1.7.5
View subversion.rb
require 'formula'
def build_java?; ARGV.include? "--java"; end
def build_perl?; ARGV.include? "--perl"; end
def build_python?; ARGV.include? "--python"; end
def build_ruby?; ARGV.include? "--ruby"; end
class UniversalNeon < Requirement
def message; <<-EOS.undent
A universal build was requested, but neon was already built for a single arch.
@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)
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);
}
@ganta
ganta / production.rb
Created July 8, 2012 11:37
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 / tmux-1.6-nfd.patch
Created September 8, 2012 08:12
tmux 1.6: Patch for UTF-8 NFD
View tmux-1.6-nfd.patch
diff --git a/utf8.c b/utf8.c
index 5ae1bba..4d95c33 100644
--- a/utf8.c
+++ b/utf8.c
@@ -135,7 +135,6 @@ struct utf8_width_entry utf8_width_table[] = {
{ 0x0135f, 0x0135f, 0, NULL, NULL },
{ 0x01a17, 0x01a18, 0, NULL, NULL },
{ 0x006e7, 0x006e8, 0, NULL, NULL },
- { 0x03099, 0x0309a, 0, NULL, NULL },
{ 0x00b4d, 0x00b4d, 0, NULL, NULL },
@ganta
ganta / tmux.rb
Created September 10, 2012 01:39
HomeBrew Formula: tmux with UTF-8 NFD patch
View tmux.rb
require 'formula'
class Tmux < Formula
homepage 'http://tmux.sourceforge.net'
url 'http://sourceforge.net/projects/tmux/files/tmux/tmux-1.6/tmux-1.6.tar.gz'
sha1 '8756f6bcecb18102b87e5d6f5952ba2541f68ed3'
head 'git://tmux.git.sourceforge.net/gitroot/tmux/tmux'
depends_on 'pkg-config' => :build
@ganta
ganta / gist:4049595
Created November 10, 2012 02:26
HomeBrew tmux UTF-8-MAC patch
View gist:4049595
diff --git a/Library/Formula/tmux.rb b/Library/Formula/tmux.rb
index f12619b..ed3d217 100644
--- a/Library/Formula/tmux.rb
+++ b/Library/Formula/tmux.rb
@@ -20,7 +20,12 @@ class Tmux < Formula
# NOTE: it applies to 1.6 only, and should be removed when 1.7 is out.
# (because it has been merged upstream)
def patches
- DATA if build.stable?
+ ps = []
@ganta
ganta / Preferences.sublime-settings
Created December 3, 2012 15:36
Sublime Text 2 - Preferences
View Preferences.sublime-settings
{
"bold_folder_labels": true,
"build_env":
{
"PATH": "/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin"
},
"caret_style": "solid",
"disable_formatted_linebreak": true,
"disable_tab_abbreviations": true,
"draw_minimap_border": true,
@ganta
ganta / hatena-keyword-link-remover.js
Last active December 11, 2015 18:39
はてなダイアリー&はてなブログのキーワードリンクを除去します。
View hatena-keyword-link-remover.js
@ganta
ganta / gvm.plugin.zsh
Last active December 12, 2015 01:08 — 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 / japanese-patch-for-emacs-24.3.patch
Created March 12, 2013 00:13
Emacs 24.3への日本語環境用のパッチです
View japanese-patch-for-emacs-24.3.patch
diff --git configure.ac configure.ac
index 62f53a3..850eaa4 100644
--- configure.ac
+++ configure.ac
@@ -1571,7 +1571,7 @@ if test "${HAVE_NS}" = yes; then
leimdir="\${ns_appresdir}/leim"
INSTALL_ARCH_INDEP_EXTRA=
fi
- NS_OBJC_OBJ="nsterm.o nsfns.o nsmenu.o nsselect.o nsimage.o nsfont.o"
+ NS_OBJC_OBJ="nsterm.o nsfns.o nsmenu.o nsselect.o nsimage.o nsfont.o macim.o"