Skip to content

Instantly share code, notes, and snippets.

View edwelker's full-sized avatar

Eddie Welker edwelker

View GitHub Profile

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

@edwelker
edwelker / BashNotes.md
Last active December 14, 2015 14:48
Bash Notes

Bash notes

bash -n : test syntax without running the script shopt -s extglob : turns on extra glob features of the shell (for regexp tests) set -o noclobber - prevents overwriting files

General

  • {} : groups a series of commands.
  • () : groups a series of commands and executes them in a subshell
  • $() - the newer syntax for ``
@edwelker
edwelker / Vim_notes.md
Created March 26, 2013 05:07
Vim notes

Vim Notes

  • o - new line below

  • O - new line above

  • gj/gk - move up or down display lines

  • f - go to the first instance of in a line

  • ; - go to the next instance of the previously searched

  • , - go to the previous instance " " "

@edwelker
edwelker / Win_install_notes
Last active December 15, 2015 10:59
Windows install notes
PATH = %PATH%;C:\Users\welkere\python;C:\Users\welkere\python\Scripts;C:\Apps\Admin_Installs\GIT\Git\libexec\git-core
Git will fail
cd C:\Apps\Admin_Installs\GIT\Git
copy bin\libiconv2.dll libexec\git-core
PATH = %PATH%;C:\Users\welkere\python\functional_web_tests\Scripts
if [ ! -d ~/env ]; then
mkdir ~/env;
fi;
echo 'export WORKON_HOME=$HOME/env' >> ~/.bash_profile
echo 'export VIRTUALENVWRAPPER_PYTHON=/opt/python-2.7/bin/python' >> ~/.bash_profile
echo 'export PATH=$PATH:/usr/local/phantomjs/1.8.1/bin' >> ~/.bash_profile
echo 'if [ -f /opt/python-2.5/bin/virtualenvwrapper.sh ]; then source /opt/python-2.5/bin/virtualenvwrapper.sh; fi;' >> ~/.bash_profile
source ~/.bash_profile
@edwelker
edwelker / tmux.txt
Last active December 20, 2015 00:19
Install tmux from source on OSX
Get the "Command line tools for XCode" installer from Apple, install.
Download ncurses
curl -O http://ftp.gnu.org/pub/gnu/ncurses/ncurses-5.9.tar.gz
tar zxvf ncurses
./configure --prefix=/Users/<user>
make
make install

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
Tmux usage:
C-a ! == break pane off into new window
: join-pane -s :0 == join pane to window 0
Bash: override noclobber >|
Extra assertions for django_nose
***
assert_redirects(response, expected_url, status_code=302, target_status_code=200, host=None, msg_prefix='')
assert_contains(response, text, count=None, status_code=200, msg_prefix='')
assert_not_contains(response, text, count=None, status_code=200, msg_prefix='')
assert_form_error(response, form, field, errors, msg_prefix='')