Skip to content

Instantly share code, notes, and snippets.

View Sixeight's full-sized avatar
🏠
Working from home

Tomohiro Nishimura Sixeight

🏠
Working from home
View GitHub Profile
# 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)
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
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 09:36
master ブランチを rebase するときのメモ
$ git fetch --all
$ git stash
$ git checkout mine
$ git rebase origin/master
$ git stash pop
# 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 }
# coding: utf-8
class Hoge
def prefix(prefix)
@prefix ||= []
@prefix << prefix
end
def with_prefix(meth)
return [@prefix.pop, meth].join('_')
end
@Sixeight
Sixeight / olm.rb
Created October 22, 2011 02:00 — forked from hitode909/olm.rb
One liner music player for Ruby. http://hitode909.appspot.com/one-liner-music/
require 'rubygems'
require 'ffi-portaudio'
def safe
r = nil
Thread.new {
$SAFE = 4
r = yield
}.join
r
# coding: utf-8
module NaturalOrderStringComparison
COMPARE_EXPRESSION = /^(\D*)(\d*)(.*)$/.freeze
def compare(str1, str2)
str1, str2 = str1.dup, str2.dup
while (str1.length > 0) || (str2.length > 0) do
@Sixeight
Sixeight / cassandra6.rb
Created July 5, 2011 09:16
diff から起したのでもしかすると動かないかも
require 'formula'
class Cassandra < Formula
url 'http://www.mirrorservice.org/sites/ftp.apache.org//cassandra/0.6.13/apache-cassandra-0.6.13-bin.tar.gz'
homepage 'http://cassandra.apache.org'
md5 '9041e7a02e9d162406028fe8c7a63d39'
def install
(var+"lib/cassandra").mkpath
require 'formula'
class Skktools < Formula
url 'http://openlab.ring.gr.jp/skk/tools/skktools-1.3.2.tar.gz'
homepage 'http://openlab.ring.gr.jp/skk/'
md5 '88861ccbe74180b2a7bacfc25484409d'
version '1.3.2'
def install
system "./configure", "--disable-debug", "--disable-dependency-tracking", "--prefix=#{prefix}"