Skip to content

Instantly share code, notes, and snippets.

View tomoyukiinoue's full-sized avatar

Tomoyuki INOUE tomoyukiinoue

  • Beartail
  • Japan, Tokyo, Shinagawa
View GitHub Profile
@tomoyukiinoue
tomoyukiinoue / gist:6711249a7c9e0ef34aca
Created August 9, 2015 04:08
Macで使用中のファイルがあってゴミ箱を空できない場合
$ fuser ~/.Trash/hogefile
/Users/inoue/.Trash/hogefile: 51369
$ kill -9 51369
@tomoyukiinoue
tomoyukiinoue / gist:9985be2578410b98e117
Created August 9, 2015 04:12
Macでディレクトリを要領順に並べる
$ brew install coreutils
$ gdu -b -d 1 | sort -n | gnumfmt --to=iec --suffix=B --padding=5
@tomoyukiinoue
tomoyukiinoue / gist:3887363
Created October 14, 2012 04:40
Install git-flow for Mac OS X Mountain Lion (10.8.2)
$ brew update
$ brew install git-flow
$ cd myapp
$ git init
$ git init flow
No branches exist yet. Base branches must be created now.
Branch name for production releases: [master]
Branch name for "next release" development: [develop]
How to name your supporting branch prefixes?
@tomoyukiinoue
tomoyukiinoue / gist:3888484
Created October 14, 2012 12:52
git rm all files without git rm
git status | grep deleted: | awk '{print $3}' | xargs git rm
@tomoyukiinoue
tomoyukiinoue / gist:3888525
Created October 14, 2012 13:13
QRCode on rails
def generate_qr_image( url )
raw "http://chart.apis.google.com/chart?chs=150x150&cht=qr&chl=#{url}&choe=UTF-8"
end
@tomoyukiinoue
tomoyukiinoue / gist:3891816
Created October 15, 2012 10:15
run the rails server with the production mode
$ rails s -e production
@tomoyukiinoue
tomoyukiinoue / gist:3892167
Created October 15, 2012 12:16
Get own private IP address
require 'socket'
def my_first_private_ipv4
Socket.ip_address_list.detect{|intf| intf.ipv4_private?}
end
@tomoyukiinoue
tomoyukiinoue / .bash_profile
Created October 29, 2012 03:46
My mac's default profile
PS1="\W $ "
alias ll='ls -l'
alias ..="cd .."
alias la="ls -la"
export CLICOLOR=1
export LSCOLORS=ExGxcxdxCxegedabagacad
alias s="'/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl' -w"
@tomoyukiinoue
tomoyukiinoue / Preferences.sublime-settings
Created October 30, 2012 00:44
Sublime Text 2 User Preferences
// Settings in here override those in "Default/Preferences.sublime-settings", and
// are overridden in turn by file type specific settings.
{
// The number of spaces a tab is considered equal to
"tab_size": 2,
// Set to true to insert spaces when tab is pressed
"translate_tabs_to_spaces": false
}
@tomoyukiinoue
tomoyukiinoue / gist:4173349
Created November 30, 2012 02:14
How to pass inputing the username and password when you push to the repository using https from mac os x.
$ git clone git://github.com/gitster/git
$ cd git/contrib/credential/osxkeychain
$ make
$ sudo cp git-credential-osxkeychain /usr/local/bin/git-credential-osxkeychain
$ sudo chmod 755 /usr/local/bin/git-credential-osxkeychain
$ sudo git config --global credential.helper osxkeychain