start new:
tmux
start new with session name:
tmux new -s myname
| #! /usr/bin/env python | |
| # Standard library imports. | |
| from SocketServer import ThreadingMixIn | |
| import BaseHTTPServer | |
| import SimpleHTTPServer | |
| import sys | |
| import json | |
| import os | |
| from os.path import (join, exists, dirname, abspath, isabs, sep, walk, splitext, |
| #!/bin/bash | |
| # If the process is already running, you can use the following: | |
| PID=`pgrep processname` | |
| renice -n 19 $PID | |
| ionice -c 3 -p $PID | |
| # For new processes, just chain them together | |
| nice -n 19 ionice -c 3 processname |
| updatechromium () { | |
| Platform='unknown' | |
| platform='unknown' | |
| unamestr=`uname` | |
| case "$unamestr" in | |
| ('Darwin') Platform="Mac" | |
| platform="mac" ;; | |
| ('Linux') Platform="Linux" | |
| platform="linux" ;; | |
| (*) if [[ $# = 2 ]] |
| gifify() { | |
| if [[ -n "$1" ]]; then | |
| if [[ $2 == '--good' ]]; then | |
| ffmpeg -i $1 -r 10 -vcodec png out-static-%05d.png | |
| time convert -verbose +dither -layers Optimize -resize 600x600\> out-static*.png GIF:- | gifsicle --colors 128 --delay=5 --loop --optimize=3 --multifile - > $1.gif | |
| rm out-static*.png | |
| else | |
| ffmpeg -i $1 -s 600x400 -pix_fmt rgb24 -r 10 -f gif - | gifsicle --optimize=3 --delay=3 > $1.gif | |
| fi | |
| else |
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| """ | |
| HTTP server that provides a web interface to run "tail" on a file, | |
| like the Unix command. | |
| This is a standalone script. No external dependencies required. | |
| How to invoke: |