Skip to content

Instantly share code, notes, and snippets.

View stevepotayteo's full-sized avatar

Steve Teo stevepotayteo

  • Horangi Cyber Security
  • Singapore
  • LinkedIn in/steveteo
View GitHub Profile
@stevepotayteo
stevepotayteo / whatshell.sh
Created February 11, 2014 06:20
whatshell.sh
: 'This script aims at recognizing all Bourne compatible shells.
Emphasis is on shells without any version variables.
Comments to mascheck@in-ulm.de'
: '$Id: whatshell.sh,v 1.17 2012/04/23 21:59:02 xmascheck Exp xmascheck $'
: 'fixes are tracked on www.in-ulm.de/~mascheck/various/whatshell/'
LC_ALL=C export LC_ALL
: 'trivial cases first, yet parseable for historic shells'
case $BASH_VERSION in *.*) { echo "bash $BASH_VERSION";exit;};;esac
case $ZSH_VERSION in *.*) { echo "zsh $ZSH_VERSION";exit;};;esac

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

http://www.codem0nk3y.com/2012/12/how-to-reload-zsh-config/
http://unix.stackexchange.com/questions/14300/tmux-move-window-to-pane
# pane movement
bind-key j command-prompt -p "join pane from:" "join-pane -s '%%'"
bind-key s command-prompt -p "send pane to:" "join-pane -t '%%'"
@stevepotayteo
stevepotayteo / 0_reuse_code.js
Created October 10, 2013 09:21
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@stevepotayteo
stevepotayteo / launch_sublime_from_terminal.markdown
Created May 28, 2012 03:04 — forked from artero/launch_sublime_from_terminal.markdown
Launch Sublime Text 2 from the Mac OS X Terminal

Launch Sublime Text 2 from the Mac OS X Terminal

Sublime Text 2 ships with a CLI called subl (why not "sublime", go figure). This utility is hidden in the following folder (assuming you installed Sublime in /Applications like normal folk. If this following line opens Sublime Text for you, then bingo, you're ready.

open /Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl

You can find more (official) details about subl here: http://www.sublimetext.com/docs/2/osx_command_line.html

Installation