Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
Where's my Boy Bawang?

Toshiki Inami peco8

💭
Where's my Boy Bawang?
  • Rakuten, Inc
  • Tokyo
View GitHub Profile
View knife cheat
# knife cheat
## Search Examples
knife search "name:ip*"
knife search "platform:ubuntu*"
knife search "platform:*" -a macaddress
knife search "platform:ubuntu*" -a uptime
knife search "platform:ubuntu*" -a virtualization.system
knife search "platform:ubuntu*" -a network.default_gateway
@peco8
peco8 / Gemfile
Created Nov 13, 2015 — forked from kazu69/Gemfile
Vagrantで作った環境にChef12 でChef Serverをためしてみた
View Gemfile
source 'https://rubygems.org'
gem 'chef'
gem 'knife-solo'
@peco8
peco8 / nginx_try_files_memo.md
Created Nov 19, 2015 — forked from kenjiskywalker/nginx_try_files_memo.md
nginxのtry_filesの動作の確認
View nginx_try_files_memo.md

nginx config

nginx.conf

server {
    listen 80;
    server_name example.com;
    root /var/www/html/;
    index index.html;
    access_log /var/log/nginx/access_log hogehoge;
@peco8
peco8 / 000-Cheat-Sheets.md
Created Dec 12, 2015 — forked from JoshuaEstes/000-Cheat-Sheets.md
Developer Cheat Sheets for bash, git, gpg, irssi, mutt, tmux, and vim. See my dotfiles repository for extra info.
@peco8
peco8 / README.md
Created Dec 13, 2015
This is tree-ish contents listing script, which outputs the contents recursively.
View README.md

keep_listing.sh

What is this?

This is tree-ish contents listing script, which outputs the contents recursively.

How to use it?

keep_listing.sh $path

@peco8
peco8 / file_finder.sh
Created Dec 13, 2015
Find file in current directory recursively, and print lines which match PATTERN.
View file_finder.sh
#!/bin/bash
usage()
{
# Fetch the shell script name
local script_name=$(basename "$0")
# Show help
cat << END
@peco8
peco8 / .emacs
Created Feb 1, 2016 — forked from ftrain/.emacs
a nice .emacs for when you are on a terminal. Respects scroll wheel events. Very useful when run inside of tmux and combined with this tmuxconf: https://gist.github.com/ftrain/8443744
View .emacs
;; .emacs
;;; uncomment this line to disable loading of "default.el" at startup
;; (setq inhibit-default-init t)
;; enable visual feedback on selections
(setq transient-mark-mode t)
;; default to better frame titles
(setq frame-title-format
@peco8
peco8 / Vagrantfile
Created Feb 9, 2016 — forked from leifg/Vagrantfile
Add a second disk to system using vagrant
View Vagrantfile
file_to_disk = './tmp/large_disk.vdi'
Vagrant::Config.run do |config|
config.vm.box = 'base'
config.vm.customize ['createhd', '--filename', file_to_disk, '--size', 500 * 1024]
config.vm.customize ['storageattach', :id, '--storagectl', 'SATA Controller', '--port', 1, '--device', 0, '--type', 'hdd', '--medium', file_to_disk]
end
@peco8
peco8 / tsn.srt
Created Apr 2, 2016 — forked from shelling/tsn.srt
The Social Network subtitle
View tsn.srt
1
00:00:04,829 --> 00:00:09,829
Credit to: Sakti Tandi [1st Indonesian-Script]
English. Subs. and. Re-Sync. by npdv-iD
2
00:00:19,043 --> 00:00:21,168
You know there are more people
with genius IQ living in China
View aasm-1.rb
class Plan < ActiveRecord::Base
include AASM
aasm column: 'state' do
state :pending, initial: true
state :processing
state :finished
state :errored
event :process, after: Proc.new { start } do