Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Tomohiro Nishimura Sixeight

🏠
Working from home
View GitHub Profile
View cat_removes_branch.rb
# coding: utf-8
require 'readline'
branches = `git branch -r`
branches = branches.split(/\n/).map {|b| b.strip }
branches.shift
branches.delete_if {|branch| branch == 'origin/master' }
candidates = %w[check log grep open delete tag skip exit]
@Sixeight
Sixeight / gist:6855391
Last active Dec 24, 2015
Xcode5にするとUnityのプラグインのコンパイル時に警告が出る問題
View gist:6855391
diff --git a/Info.plist b/Info.plist
index 30cb05c..d856ed8 100644
--- a/Info.plist
+++ b/Info.plist
@@ -42,6 +42,10 @@
<true/>
<key>XCPluginHasUI</key>
<false/>
+ <key>DVTPlugInCompatibilityUUIDs</key>
+ <array>
View gist:4771462
Preference-ENGINE:/Users/tomohiro:(---) 2.0.0-rc2
2:16:> irb
irb(main):001:0> require 'fiddle'
=> true
irb(main):002:0> DL
NameError: uninitialized constant DL
from (irb):2
from /Users/tomohiro/.rbenv/versions/2.0.0-rc2/bin/irb:12:in `<main>'
irb(main):003:0>
View gist:3922429
# coding: utf-8
fetcher = Takeyamachi::Config.platforms.map do |platform|
Takeyamachi::FetcherFactory.create(platform)
end
Forever.run do
before :all do
fetchers.each do |fetcher|
config = Takeyamachi::Config.get(fetcher.platform)
View gist:3397935
5:55:> rbenv install 2.0.0-dev
Downloading http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz...
Installing yaml-0.1.4...
Installed yaml-0.1.4 to /Users/tomohiro/.rbenv/versions/2.0.0-dev
Cloning https://github.com/ruby/ruby.git...
Installing ruby-2.0.0-dev...
BUILD FAILED
Inspect or clean up the working tree at /var/folders/cb/1lmqy4c97fngmt0qqxdb_qzc0000gn/T/ruby-build.20120820055546.34146
View cassandra-07.rb
require 'formula'
class Cassandra07 < Formula
url 'http://ftp.riken.jp/net/apache//cassandra/0.7.10/apache-cassandra-0.7.10-bin.tar.gz'
homepage 'http://cassandra.apache.org'
md5 'f0183e67d27178a0d42f56f4dbea4f6e'
def install
(var + "lib/cassandra-0.7").mkpath
(var + "log/cassandra-0.7").mkpath
@Sixeight
Sixeight / gist:2774265
Created May 23, 2012
master ブランチを rebase するときのメモ
View gist:2774265
$ git fetch --all
$ git stash
$ git checkout mine
$ git rebase origin/master
$ git stash pop
View gist:2309491
# coding: utf-8
require 'open-uri'
require 'nokogiri'
URL = 'http://www.google.com/doubleclick/studio/swiffy/releasenotes.html'
doc = Nokogiri::HTML(open(URL))
puts releases = doc.css('div.releaseNotesItem').map {|div| div.css('p').text }
View gist:1896800
# coding: utf-8
class Hoge
def prefix(prefix)
@prefix ||= []
@prefix << prefix
end
def with_prefix(meth)
return [@prefix.pop, meth].join('_')
end
View olm.rb
require 'rubygems'
require 'ffi-portaudio'
def safe
r = nil
Thread.new {
$SAFE = 4
r = yield
}.join
r