Skip to content

Instantly share code, notes, and snippets.

Avatar

Isao Sugimoto d6rkaiz

View GitHub Profile
@d6rkaiz
d6rkaiz / cpuinfo.txt
Last active Dec 12, 2016
cpuinfo ConoHa 1GB plan
View cpuinfo.txt
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 63
model name : Intel(R) Xeon(R) CPU E5-2660 v3 @ 2.60GHz
stepping : 2
microcode : 0x1
cpu MHz : 2599.996
cache size : 4096 KB
physical id : 0
@d6rkaiz
d6rkaiz / cpuinfo.txt
Created Dec 12, 2016
cpuinfo DigitalOcean 1GB plan
View cpuinfo.txt
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 63
model name : Intel(R) Xeon(R) CPU E5-2650L v3 @ 1.80GHz
stepping : 2
microcode : 0x1
cpu MHz : 1799.998
cache size : 30720 KB
physical id : 0
@d6rkaiz
d6rkaiz / cpuinfo.txt
Created Dec 12, 2016
cpuinfo linode 2048 plan
View cpuinfo.txt
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 79
model name : Intel(R) Xeon(R) CPU E5-2697 v4 @ 2.30GHz
stepping : 1
microcode : 0x1
cpu MHz : 2299.968
cache size : 4096 KB
physical id : 0
@d6rkaiz
d6rkaiz / hook.rb
Created May 1, 2016 — forked from asimihsan/hook.rb
Hook for letsencrypt.sh to do DNS challenges
View hook.rb
#!/usr/bin/env ruby
require 'aws-sdk'
require 'pry'
require 'awesome_print'
require 'domain_name'
# ------------------------------------------------------------------------------
# Credentials
# ------------------------------------------------------------------------------
View staging.rb
require Rails.root.join('config/environments/production')
MyApp::Application.configure do
config.action_dispatch.tld_length = 2 # domain.com vs staging.domain.com
end
@d6rkaiz
d6rkaiz / gist:8242da41792ff5981d7a
Created Sep 9, 2014
irb `RDoc::RI::Driver::NotFoundError`
View gist:8242da41792ff5981d7a
$ irb
irb(main):001:0> help
Enter the method name you want to look up.
You can use tab to autocomplete.
Enter a blank line to exit.
>> \q
RDoc::RI::Driver::NotFoundError: \q
from /Users/d6rkaiz/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/rdoc-4.1.1/lib/rdoc/ri/driver.rb:921:in `block in expand_class'
@d6rkaiz
d6rkaiz / 0_reuse_code.js
Created Aug 22, 2014
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@d6rkaiz
d6rkaiz / gist:9087914
Created Feb 19, 2014
go lang build fail on wheezy 7.4
View gist:9087914
$ hg clone -u release https://code.google.com/p/go
$ cd go/src
$ ./all.bash

snip...

--- FAIL: TestBlockProfile (0.17 seconds)
@d6rkaiz
d6rkaiz / file0.txt
Created Sep 4, 2013
tmuxでセッションの有無を判別して起動するスクリプト ref: http://qiita.com/d6rkaiz/items/993ef586aa39f2ddb588
View file0.txt
#!/bin/bash
tmux ls > /dev/null
if [ $? -eq 1 -a -z "$TMUX" ]; then
exec tmux
elif [ -z "$TMUX" ] ; then
exec tmux attach
else
echo "sessions should be nested with care."
fi
@d6rkaiz
d6rkaiz / file0.txt
Created Jul 22, 2013
gitでリモートブランチをすべて取得するシェルスクリプト ref: http://qiita.com/d6rkaiz/items/e14aaf63ecd8aa9f715b
View file0.txt
#!/bin/bash
for remote_branch in `git branch -a | grep remotes | grep -v HEAD | grep -v master`; do
remote_name="$(echo -n "$remote_branch" | cut -d/ -f2)"
branch_name="$(echo -n "$remote_branch" | cut -d/ -f3)"
git checkout -b $branch_name $remote_name/$branch_name
done
git checkout master