Skip to content

Instantly share code, notes, and snippets.

@yono
yono / csv
Last active August 29, 2015 14:18
gongo-ask.fm
Q,A
キノコは野菜ですか?,キノコです
肉は野菜ですか?,肉は肉だ
畑の肉と呼ばれている大豆はどうですか?,大豆いいですね。あまり食べませんが
オクラは食べ物ですか?,オクラは食べ物だけど俺は食わない。いいか、俺は食わない
@yono
yono / 0.md
Last active August 29, 2015 14:02
vagrant のデフォルト設定を上書きする

~/.vagrant.d/Vagrantfile を配置すると vagrant のデフォルト設定を変更できる。

メモリ設定がデフォルトだと 512 なんだけど 2048 にしたいとかそういう場合に使う

参考: http://docs.vagrantup.com/v2/vagrantfile/index.html

@yono
yono / 0.md
Last active December 8, 2015 12:02
1.9.2-p0-gem-1.3.7

rbenv 経由で ruby-1.9.2-p0 (with gem 1.3.7) がインストールしたい

デフォの rbenv じゃダメなのか

デフォだと gem 1.8 系列が入って特定のシステムが動かない

Mac だとどうすればインストールできるの

この gist 内の 1.9.2-p0-gem-1.3 を使えばインストールできる

@yono
yono / 0.md
Created June 3, 2014 18:23
rake db:seeds で FactoryGirl を使う
@yono
yono / 0.md
Last active December 26, 2017 08:57
fabric で踏み台サーバ越しに ssh アクセス

前提

  • [local] -> [admin] -> [prod]
  • [admin] -> [prod] の鍵は事前に配置済み
  • $HOME/.ssh/config で設定
  • 踏み台サーバ(admin)、目的のサーバ(prod) どちらにも鍵認証でログイン

結果

  • $HOME/.ssh/config だけだと実行終了時の DONE で固まる
@yono
yono / gist:6198798
Last active December 20, 2015 21:39
@yono
yono / gist:6062053
Created July 23, 2013 12:37
Gemfile for faker-japanese
# A sample Gemfile
source "https://rubygems.org"
gem 'faker'
gem 'faker-japanese'
gem 'romankana'
gem 'pry'
@yono
yono / gist:5993841
Last active December 19, 2015 17:48

CLI

  • zsh
  • vim
  • tmux
  • git
  • tig
  • dotfiles
  • bundlizer
  • rbenv
package "postgresql" do
action :install
end
service "postgresql" do
supports :status => true, :restart => true, :reload => true
action [ :enable, :start ]
end
#!/bin/bash
#
# 2nd_gig
#
# description: start, stop, restart 2nd_gig (Github IRC Gateway)
#
NAME=gig
USER=yono
DIR=/home/$USER/servers/2nd_gig