Skip to content

Instantly share code, notes, and snippets.

View hokkai7go's full-sized avatar

Yutaro Sugai hokkai7go

View GitHub Profile
require 'rubygems'
require 'net/irc'
class ExampleClient < Net::IRC::Client
def hash_make
@hash = Hash.new
@hash["hokkai7go"] = 0.to_i
end
@hokkai7go
hokkai7go / example1.rb
Created June 2, 2012 05:18
minatork01_socialcoding_example1
@data = Array.new()
Num = 5
Height = 10
Not_line = " "
Line = "---"
def make_data
Height.times do |h|
@data << make_line(Num)
end
@hokkai7go
hokkai7go / destinations.yaml
Created July 24, 2012 05:54
It is used to decide where I travel
- Taiwan
- NZL
@hokkai7go
hokkai7go / mysql.rb
Created September 4, 2012 02:08
to install MySQL5.1 using Homebrew
require 'formula'
class Mysql <Formula
homepage 'http://dev.mysql.com/doc/refman/5.1/en/'
url 'http://mysql.mirrors.pair.com/Downloads/MySQL-5.1/mysql-5.1.65.tar.gz'
md5 '376967de2ec738eaec27f7dcf58c3c66'
depends_on 'readline'
def options
@hokkai7go
hokkai7go / rabbit_abort_when_execute
Created October 6, 2012 00:21
rabbit abort because of "out of memory"
/Users/hokkai7go/.rvm/gems/ruby-1.9.2-p290/gems/rabbit-2.0.5/lib/rabbit/renderer/engine/cairo.rb:152:in `restore': out of memory
from /Users/hokkai7go/.rvm/gems/ruby-1.9.2-p290/gems/rabbit-2.0.5/lib/rabbit/renderer/engine/cairo.rb:152:in `restore_context'
from /Users/hokkai7go/.rvm/gems/ruby-1.9.2-p290/gems/rabbit-2.0.5/lib/rabbit/renderer/kernel.rb:58:in `ensure in draw_slide'
from /Users/hokkai7go/.rvm/gems/ruby-1.9.2-p290/gems/rabbit-2.0.5/lib/rabbit/renderer/kernel.rb:58:in `draw_slide'
from /Users/hokkai7go/.rvm/gems/ruby-1.9.2-p290/gems/rabbit-2.0.5/lib/rabbit/renderer/display/drawing-area-base.rb:307:in `draw_slide'
from /Users/hokkai7go/.rvm/gems/ruby-1.9.2-p290/gems/rabbit-2.0.5/lib/rabbit/element/slide-element.rb:33:in `draw'
from /Users/hokkai7go/.rvm/gems/ruby-1.9.2-p290/gems/rabbit-2.0.5/lib/rabbit/renderer/display/drawing-area-primitive.rb:157:in `draw_current_slide'
from /Users/hokkai7go/.rvm/gems/ruby-1.9.2-p290/gems/rabbit-2.0.5/lib/rabbit/renderer/display/drawing-area-primitive
@hokkai7go
hokkai7go / twitter_search_json.rb
Created October 7, 2012 07:26
search twitter using json format
require "net/http"
require "json"
request = Net::HTTP::Get.new("/search.json?q=railsgirls")
http = Net::HTTP.start('search.twitter.com')
response = http.request(request)
puts JSON.parse(response.body)
@hokkai7go
hokkai7go / chef_td_agent_faillog
Created April 9, 2013 08:00
chef-td-agent faillog
Generated at Tue Apr 09 13:24:35 +0900 2013
NameError: Cannot find a resource for apt_repository on ubuntu version 10.04
/opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-10.14.2/bin/../lib/chef/resource_platform_map.rb:126:in `get'
/opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-10.14.2/bin/../lib/chef/resource.rb:837:in `resource_for_platform'
/opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-10.14.2/bin/../lib/chef/resource.rb:854:in `resource_for_node'
/opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-10.14.2/bin/../lib/chef/mixin/recipe_definition_dsl_core.rb:58:in `method_missing'
/tmp/vagrant-chef-1/chef-solo-1/cookbooks/td-agent/recipes/default.rb:36:in `from_file'
/opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-10.14.2/bin/../lib/chef/cookbook_version.rb:558:in `load_recipe'
/opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-10.14.2/bin/../lib/chef/mixin/language_include_recipe.rb:46:in `load_recipe'
/opt/vagrant_ruby/lib/ruby/gems/1.8/gems/chef-10.14.2/bin/../lib/chef/mixin/language_include_recipe.rb:33:in `include_reci
@hokkai7go
hokkai7go / Vagrantfile
Created April 16, 2013 06:15
Vagrantfile for jira
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
# All Vagrant configuration is done here. The most common configuration
# options are documented and commented below. For a complete reference,
# please see the online documentation at vagrantup.com.
# Every Vagrant virtual environment requires a box to build off of.
config.vm.box = "precise32"
@hokkai7go
hokkai7go / gist:47a2c0e7b0e3b76645b1
Last active August 29, 2015 14:05
sushi_hokkai7go
  1. 集まりやすい花まるに凸する
    1. 時間をずらして列に並ぶ時間を極力短くする
    2. みんなの都合の良い時間に集まって、無理なら東京駅近辺で他のものを食べる
      1. 八重洲の地下にいくつか思い当たるお店があったようななかったような
  2. 押上のトリトンに凸する
    1. 時間をずらして列に並ぶ時間を極力短くする
    2. みんなの都合の良い時間に集まって、ソラマチで何か食べる
    3. 錦糸町で何か食べる
  3. @hokkai7go の勤務先の近くにある寿司屋に行く

#名前

  • すがいです(hokkai7go)

#職業

  • インフラを中心としていろいろやってます

#ステータス

Rails