Skip to content

Instantly share code, notes, and snippets.

View tomohiro's full-sized avatar
😎

Tomohiro Taira tomohiro

😎
View GitHub Profile
@tomohiro
tomohiro / setup.md
Last active December 11, 2015 19:28
Setup the Redmine 2.2-stable
$ git clone git://github.com/redmine/redmine.git

$ cd redmine
$ git co -t origin/2.2-stable

$ rbenv local 1.9.3-p374

$ bundle install --path vendor/bundle --without test postgresql mysql rmagick
@tomohiro
tomohiro / .env
Last active December 11, 2015 05:39
Rakurai on Heroku
BASE_URI=http://example.com
USERNAME=username
PASSWORD=password

そこのプログラミングが堪能な人たち、おめでとう。あなたは、死ぬほど努力してプログラミングを覚えたか、プログラミングの天才か、はたまたぼくみたいにラッキーな人だろう。プログラマーの戯れ言でしかないが、そんなあなたには、他の人のプログラミングを公の場所でバカにするのではなく(ぼく自身これを何度もやってきており、相当後悔している)、個人的にそっと間違いを指摘してあげたり、どうやったら正しいプログラミングができるようになるのか啓蒙する人であってほしい。そっちの方がはるかに生産的だし、プログラミング初学者の総体的な技術力の向上にもつながるだろう。

テンプレ: 猪瀬さんの英語を恥ずかしがる人が恥ずかしい件 - http://j.ktamura.com/archives/15209

@tomohiro
tomohiro / Gemfile
Created November 30, 2012 10:19
IRC bot
source :rubygems
gem 'kris', :git => 'git://github.com/Tomohiro/kris.git'
gem 'mechanize'
@tomohiro
tomohiro / yahoo-fortune.rb
Created October 24, 2012 04:02
Yahoo! おみくじ
#!/usr/bin/env ruby
# encoding: utf-8
require 'rubygems'
require 'open-uri'
require 'nokogiri'
class Fortune
def self.choice
sex = [
@tomohiro
tomohiro / yahoo-sun-sign-astrology.rb
Created October 24, 2012 03:55
Yahoo! 星座占い
#!/usr/bin/env ruby
# encoding: utf-8
require 'kconv'
require 'rubygems'
require 'open-uri'
require 'nokogiri'
class SunSignAstrology
@tomohiro
tomohiro / Procfile
Created September 10, 2012 05:07
Monitoring server log files with Foreman
asimov: ssh asimov.local tail -F /path/to/httpd/access_log
clarke: ssh clarke.local tail -F /path/to/httpd/access_log
heinlein: ssh heinlein.local tail -F /path/to/httpd/access_log
@tomohiro
tomohiro / git-dojo-1.markdown
Created September 8, 2012 04:34
Git 道場 #2 in JavaKueche
@tomohiro
tomohiro / search-snapshot.sh
Created August 31, 2012 08:02
ESX の仮想マシン Snapshot が存在するかどうか
#!/bin/sh
DATASTORE="/vmfs/volumes/$(ls /vmfs/volumes | grep Storage)"
cd "$DATASTORE"
for d in $(ls); do
[ -f $d ] && continue
snapshot=$(ls $d | grep Snapshot)
[ ! $snapshot ] || {
echo $d
@tomohiro
tomohiro / enumerator.php
Created August 23, 2012 09:43
Ruby like Enumurator in PHP
<?php
namespace RubyLike {
class Enumerator extends \ArrayObject
{
public static function build()
{
return (new \ReflectionClass(get_called_class()))->newInstanceArgs(func_get_args());
}
public function all()