Skip to content

Instantly share code, notes, and snippets.

@kevonc
kevonc / gist:79ca1167c12b1d8da917
Last active August 29, 2015 14:10
Install A Great Dev Machine!
#1 - Install Thoughtbot's script
https://github.com/thoughtbot/laptop
#2 - iTerm2 / byobu
- Download iTerm2 Solarized Dark
- https://github.com/mbadolato/iTerm2-Color-Schemes
http://fideloper.com/mac-vim-tmux
http://www.sitepoint.com/tmux-a-simple-start/
https://gist.github.com/simme/1297707
http://www.linux.com/learn/tutorials/623327-enhancing-virtual-terminals-with-byobu
@kevonc
kevonc / gist:719e128abbac2c28aa8b
Last active August 29, 2015 14:02
terminal - show computer, path, git branch, and # of commits for pushing or pulling
# source this file
wget https://github.com/ktaragorn/dotfiles/blob/master/bashrc.d/scm_ps1
brew install bash-completion
# copy into bash_profile
source scm_ps1
if [ -f $(brew --prefix)/etc/bash_completion ]; then
. $(brew --prefix)/etc/bash_completion
@kevonc
kevonc / gist:9758807
Created March 25, 2014 10:28
aws s3 bucket public policy
{
"Version": "2008-10-17",
"Id": "Policy1395742968152",
"Statement": [
{
"Sid": "Stmt1395742934142",
"Effect": "Allow",
"Principal": {
"AWS": "*"
},
@kevonc
kevonc / gist:9478886
Created March 11, 2014 03:21
bash script to find parent dir path
PROJECT_DIR="$( cd "$( dirname "${BASH_SOURCE}" )/.." && pwd )"
@kevonc
kevonc / gist:9301174
Created March 2, 2014 02:52
One-line batch file rename
To Change [1] to .jpg in all your files
First, lets display the output to make sure it is correct
ls * | awk '{print("mv "$1" "$1)}' | sed 's/\[1\]/.jpg/2'
If it looks right, pipe the output to shell to execute
ls * | awk '{print("mv "$1" "$1)}' | sed 's/\[1\]/.jpg/2' | /bin/sh
@kevonc
kevonc / gist:9247032
Last active August 29, 2015 13:56
a list of useful sublime packages
"AlignTab",
"BeautifyRuby",
"Block Cursor Everywhere",
"BracketHighlighter",
"CTags",
"Decent Color Scheme",
"Git",
"GitGutter",
"Haml",
"Neon Color Scheme",

Sublime Text 2 - Useful Shortcuts

Tested in Mac OS X: super == command

Open/Goto


  • super+t: go to file
  • super+ctrl+p: go to project
  • super+r: go to methods
@kevonc
kevonc / gist:8415303
Created January 14, 2014 09:00
Prevent SSH connection from freezing
add the following lines to ~/.ssh/config
ServerAliveCountMax 3
ServerAliveInterval 10
@kevonc
kevonc / .bash_profile
Last active April 24, 2016 13:52
To pretty up the terminal prompt, edit ~/.bash_profile.
# Change from zsh to bash
chsh
change /bin/zsh to /bin/bash
# .bash_profile
# Exports
# =======
# Make sublime our editor of choice
@kevonc
kevonc / gist:8001700
Last active April 24, 2016 13:52
Config to open sublime text 2 in terminal, in the root directory (OS X El Capitan)
sudo ln -s "/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl" /usr/local/bin/subl