Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000| Arranged from smallest to largest, happiest to saddest, in order of increasing domination: | |
| function common name | |
| -------- ----------- | |
| O( 1 ) :: constant | |
| is a subset of O( log n ) :: logarithmic | |
| is a subset of O( log^2 n ) :: log-squared [that's (log n)^2 ] | |
| is a subset of O( root(n) ) :: root-n [that's the square root] | |
| is a subset of O( n ) :: linear | |
| is a subset of O( n log n ) :: n log n |
| #!/bin/sh | |
| # Some things taken from here | |
| # https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
| # Set the colours you can use | |
| black='\033[0;30m' | |
| white='\033[0;37m' | |
| red='\033[0;31m' | |
| green='\033[0;32m' |
| #!/bin/sh | |
| # Alot of these configs have been taken from the various places | |
| # on the web, most from here | |
| # https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
| # Set the colours you can use | |
| black='\033[0;30m' | |
| white='\033[0;37m' | |
| red='\033[0;31m' |
| List all installed Linux kernel images: | |
| dpkg --list | egrep -i --color 'linux-image|linux-headers' | |
| Remove a single image: | |
| apt-get --purge remove linux-image-... | |
| Remove all: | |
| apt-get purge $(dpkg --list |egrep 'linux-image-[0-9]' |awk '{print $3,$2}' |sort -nr |tail -n +3 |grep -v $(uname -r) |awk '{ print $2}') |
| Supported escape sequences: | |
| ~. - terminate session | |
| ~B - send a BREAK to the remote system | |
| ~R - Request rekey (SSH protocol 2 only) | |
| ~# - list forwarded connections | |
| ~? - this message | |
| ~~ - send the escape character by typing it twice | |
| (Note that escapes are only recognized immediately after newline.) |
| sudo apt-mark hold packagename | |
| sudo apt-mark unhold packagename | |
| dpkg --get-selections | grep "hold" |
| #!/bin/sh | |
| git filter-branch --env-filter ' | |
| OLD_EMAIL="your-old-email@example.com" | |
| CORRECT_NAME="Your Correct Name" | |
| CORRECT_EMAIL="your-correct-email@example.com" | |
| if [ "$GIT_COMMITTER_EMAIL" = "$OLD_EMAIL" ] | |
| then | |
| export GIT_COMMITTER_NAME="$CORRECT_NAME" | |
| export GIT_COMMITTER_EMAIL="$CORRECT_EMAIL" |
| This is a tweak of https://github.com/mislav/dotfiles/blob/master/bin/tmux-vim-select-pane | |
| which is linked from https://github.com/christoomey/vim-tmux-navigator as a possible fix for the vim integration. | |
| I couldn't get the original one to work right on tmux 1.8 so I fixed it up. | |
| These go into tmux config file: | |
| bind-key -n C-h run-shell "~/tmux-vim-select-pane -L" | |
| bind-key -n C-j run-shell "~/tmux-vim-select-pane -D" | |
| bind-key -n C-k run-shell "~/tmux-vim-select-pane -U" |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000