start new:
tmux
start new with session name:
tmux new -s myname
#!/bin/bash | |
git grep -l replaceMe | xargs sed -i 's/replaceMe/replace.me/g' |
# Useful way to stub an endpoint with JSON contained in a file. | |
import json | |
f = open('/path/to/file.json', 'r') | |
return json.load(f) |
#!/bin/bash | |
# Set the ROOM_ID & AUTH_TOKEN variables below. | |
# Further instructions at https://www.hipchat.com/docs/apiv2/auth | |
ROOM_ID=XXX | |
AUTH_TOKEN=XXX | |
MESSAGE="Hello world!" | |
curl -H "Content-Type: application/json" \ |
$('.outdated-diff-comment-container').addClass('open'); |
rsync --ignore-existing --dry-run --verbose -r SOURCE/* DESTINATION |
#!/bin/bash | |
# http://johnmacfarlane.net/pandoc/demos.html | |
pandoc -s README.md -o README.html |
# List audio devices | |
ffmpeg -list_devices true -f dshow -i dummy | |
# Pipe audio from Line In to another computer (192.168.1.17) | |
ffmpeg -f dshow -i audio="Line In (High Definition Audio " -acodec libmp3lame -ab 320000 -f rtp rtp://192.168.1.17:1234 | |
# Listen to audio on destination computer | |
ffplay rtp://192.168.1.17:1234 |
# http://stackoverflow.com/questions/748675/finding-duplicate-files-and-removing-them/748908#748908 | |
import sys | |
import os | |
import mmh3 | |
CHUNK_SIZE = 1024*1024 | |
def check_for_duplicates(paths): |