sudo visudo
and somewhere in that file add
Defaults tty_tickets
# generate the certfile with | |
# openssl req -new -x509 -keyout localhost.pem -out localhost.pem -days 365 -nodes -sha512 | |
# ... and by answering the questions openssl poses | |
# | |
# source http://www.piware.de/2011/01/creating-an-https-server-in-python/ | |
import BaseHTTPServer, SimpleHTTPServer | |
import ssl | |
httpd = BaseHTTPServer.HTTPServer(('localhost', 4443), SimpleHTTPServer.SimpleHTTPRequestHandler) |
alias nvm-latest='nvm ls-remote 4 | tail -1 && nvm ls-remote 5 | tail -1 && nvm ls-remote 6 | tail -1' |
#!/bin/sh | |
set -eu | |
git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative |
alias nvm-outdated='NVM_REMOTE_LS=`mktemp` && NVM_LOCAL_LS=`mktemp` && nvm ls-remote 0.12 | tail -1 > $NVM_REMOTE_LS && nvm ls-remote 4 | tail -1 >> $NVM_REMOTE_LS && nvm ls-remote 5 | tail -1 >> $NVM_REMOTE_LS && nvm ls | head -3 > $NVM_LOCAL_LS && diff $NVM_REMOTE_LS $NVM_LOCAL_LS && rm $NVM_REMOTE_LS $NVM_LOCAL_LS' | |
# note: when succesfull & no changes shows '-bash: echo: write error: Broken pipe' | |
# which is because piping nvm ls to something does that (2> 'ing it to /dev/null doesn't work) | |
# this alias is useful as well in the same context (and works with_out_ hitches) | |
alias nvm-latest='nvm ls-remote 0.12 | tail -1 > a && nvm ls-remote 4 | tail -1 >> a && nvm ls-remote 5 | tail -1 >> a && cat a && rm a' |
sudo visudo
and somewhere in that file add
Defaults tty_tickets
In the .inputrc add set editing-mode vi
(for bash and other stuff using gnu readline)
... or in the .bashrc add set -o vi
(if you want to use it in bash only)
Source (with lots of good nuggets): http://blog.sanctum.geek.nz/vi-mode-in-bash/
git config --global url.https://github.com/.insteadOf git://github.com/ |
pre-push hook:
set -eu
remote="$1"
url="$2"
BRANCH=`git branch | grep "^* [a-zA-Z]" | cut -c 3- `
# npm run lint && npm run jscs && npm run test &&
if [ $remote == 'origin' ]
then
### just splitting it off (which is _fast!_): | |
ffmpeg -i inputvideo.mp4 -c:a copy -vn -sn outputaudio.mp4 | |
### converting it to mp3 | |
ffmpeg -i inputvideo.mp4 -vn -b:a 128k -c:a libmp3lame outputaudio.mp3 |