start new:
tmux
start new with session name:
tmux new -s myname
| #!/usr/bin/env python | |
| """Simple HTTP Server With Upload. | |
| This module builds on BaseHTTPServer by implementing the standard GET | |
| and HEAD requests in a fairly straightforward manner. | |
| """ |
| #!/bin/bash | |
| # bash generate random alphanumeric string | |
| # | |
| # bash generate random 32 character alphanumeric string (upper and lowercase) and | |
| NEW_UUID=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1) | |
| # bash generate random 32 character alphanumeric string (lowercase only) | |
| cat /dev/urandom | tr -dc 'a-z0-9' | fold -w 32 | head -n 1 |
| #!/usr/bin/env/python | |
| # | |
| # More of a reference of using jinaj2 without actual template files. | |
| # This is great for a simple output transformation to standard out. | |
| # | |
| # Of course you will need to "sudo pip install jinja2" first! | |
| # | |
| # I like to refer to the following to remember how to use jinja2 :) | |
| # http://jinja.pocoo.org/docs/templates/ | |
| # |
| gcc -fpic --shared $(python-config --includes) greetmodule.c -o greetmodule.so |
| """ | |
| Determine IPv4 addresses on a Linux machine via the socket interface. | |
| Thanks @bubthegreat the changes to make it Py2/3 compatible and the helpful | |
| code comments: https://gist.github.com/pklaus/289646#gistcomment-2396272 | |
| This version has all comments removed for brevity. | |
| """ | |
| import socket | |
| import array | |
| import struct |