start new:
tmux
start new with session name:
tmux new -s myname
Get Homebrew installed on your mac if you don't already have it
Install highlight. "brew install highlight". (This brings down Lua and Boost as well)
""" | |
http://stackoverflow.com/questions/28022432/receiving-rtp-packets-after-rtsp-setup | |
A demo python code that .. | |
1) Connects to an IP cam with RTSP | |
2) Draws RTP/NAL/H264 packets from the camera | |
3) Writes them to a file that can be read with any stock video player (say, mplayer, vlc & other ffmpeg based video-players) | |
Done for educative/demonstrative purposes, not for efficiency..! |
You'll want to login using an official Google account (i.e. if this is for your company, use the comapany Gmail account vs. a personal one.)
When logging in, you might be prompted to verify the account; if so, enter your cell number to get a verification e-mail or phone call.
Once verified, you'll have to agree to the terms of service; do that, and click continue.
# http://henrik.nyh.se/2008/12/git-dirty-prompt | |
# http://www.simplisticcomplexity.com/2008/03/13/show-your-git-branch-name-in-your-prompt/ | |
# username@Machine ~/dev/dir[master]$ # clean working directory | |
# username@Machine ~/dev/dir[master*]$ # dirty working directory | |
function parse_git_dirty { | |
[[ $(git status 2> /dev/null | tail -n1) != "nothing to commit (working directory clean)" ]] && echo "*" | |
} | |
function parse_git_branch { | |
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/[\1$(parse_git_dirty)]/" |
# Greatest common divisor of 1 or more numbers. | |
from functools import reduce | |
def gcd(*numbers): | |
""" | |
Return the greatest common divisor of 1 or more integers | |
Examples | |
-------- |
#!/usr/bin/env bash | |
# Written by William Ting for the following blog post: | |
# http://williamting.com/posts/2012/04/18/set-up-python-and-django-on-dreamhost/ | |
rcfile="${HOME}/.bashrc" | |
version="2.7.3" | |
setuptools_version="2.7" | |
tmp_dir="${HOME}/tmp-${RANDOM}" | |
if [[ ${#} == 0 ]]; then |
curl -XPUT localhost:9200/test -d ' | |
{"settings": { | |
"analysis" :{ | |
"analyzer": { | |
"exact_analyzer": { | |
"type": "custom", | |
"tokenizer":"my_pattern_tokenizer", | |
"filter":[] | |
} | |
}, |