start new:
tmux
start new with session name:
tmux new -s myname
start a new session tmux OR | |
tmux new OR | |
tmux new-session | |
re-attach a detached session tmux attach OR | |
tmux attach-session | |
re-attach an attached session (detaching it from elsewhere) tmux attach -d OR | |
tmux attach-session -d | |
re-attach an attached session (keeping it attached elsewhere) tmux attach OR | |
tmux attach-session | |
detach from currently attached session ^b d OR |
if (typeof jQuery == 'undefined') { | |
function getScript(url) { | |
var script = document.createElement('script'); | |
script.src = url; | |
var head = document.getElementsByTagName('head')[0], | |
done = false; | |
// Attach handlers for all browsers | |
script.onload = script.onreadystatechange = function() { |
# Encrypt and split | |
tar cj file.txt | openssl des3 -salt -k password | split -b 100m -d - 'test-encrypt' | |
# Unencrypt | |
cat file.txt | openssl des3 -d -k password | tar xjf - |
# <remote> is usually origin | |
# Check out remote branch | |
git checkout -b <local-branch-name> <remote>/<remote-branch-name> | |
# Delete local branch | |
git branch -D <local-branch-name> | |
# Delete remote branch | |
git push <remote> :<remote-branch> |
# Tar | |
$ tar -cvvzf <archive-name>.tar.gz /path/to/folder | |
# Split | |
$ split -b 1M <archive-name>.tar.gz "parts-prefix" | |
#Join | |
$ cat parts-prefix* > <archive-name>.tar.gz |
find -L . -type l -print0 | xargs -0 --no-run-if-empty rm |
e2label device [ new-label ] |
#!/usr/bin/env ruby | |
puts `egrep -i ".*#{ARGV.join(".*")}.*" /etc/hosts` |