As configured in my dotfiles.
start new:
tmux
start new with session name:
#!/usr/bin/env python | |
import sys,csv | |
for row in csv.reader(sys.stdin): | |
print "\t".join(row) |
As configured in my dotfiles.
start new:
tmux
start new with session name:
The postMessage()
API is an HTML5 extension that permits string
message-passing between frames that don't share the same origin. It
is available in all modern browsers. It is not supported in IE6 and
IE7.
postMessage is generally considered very secure as long as the programmer is careful to check the origin and source of an arriving
####Resize all JPEGs in the current folder to a 760px width, preserve aspect ratio
mogrify -resize 760x *.jpg
####Crop the bottom 20% of all images in the current folder
mogrify -gravity north -crop 100x80% +repage *.jpg
####Invert colours
mogrify -negate *.png
####Make grayscale
#!/usr/bin/env python | |
""" | |
Produces load on all available CPU cores | |
""" | |
from multiprocessing import Pool | |
from multiprocessing import cpu_count | |
def f(x): | |
while True: |
#!/usr/bin/env python | |
"""Convert a master latex file, | |
into a single document by including | |
automatically all the LaTeX documents | |
which are arguments of | |
\include or \input | |
ignoring any \includeonly | |
""" | |
import sys | |
if len(sys.argv)==3: |
$(function() { | |
// good opportunity to combine into a single statement | |
// qq w cw <esc> A, <esc> 0 j q | |
var a = 10; | |
var b = 20; | |
var c = 30; | |
var d = 40; | |
var e = 50; | |
// opportunity to simplify syntax |
(function() { | |
var CSSCriticalPath = function(w, d, opts) { | |
var opt = opts || {}; | |
var css = {}; | |
var pushCSS = function(r) { | |
if(!!css[r.selectorText] === false) css[r.selectorText] = {}; | |
var styles = r.style.cssText.split(/;(?![A-Za-z0-9])/); | |
for(var i = 0; i < styles.length; i++) { | |
if(!!styles[i] === false) continue; | |
var pair = styles[i].split(": "); |