pan using zoom behaviour, unfortunately not very smooth
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/python2 | |
import gtk.gdk | |
w = gtk.gdk.window_foreign_new( gtk.gdk.get_default_root_window().property_get("_NET_ACTIVE_WINDOW")[2][0] ) | |
w.set_decorations( (w.get_decorations()+1)%2 ) # toggle between 0 and 1 | |
gtk.gdk.window_process_all_updates() | |
gtk.gdk.flush() | |
# now bind this to super-r or something |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(define (satsvis-standard fpattern) | |
(satsvis-lag-mw | |
fpattern | |
900 0 0 | |
(list (list "/path/to/multiply.jpg" 'MULTIPLY-MODE 17) | |
(list "/path/to/overlay.jpg" 'OVERLAY-MODE 30)))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
decodehtmlentities='#!/usr/bin/env python2 | |
import sys, codecs | |
sys.stdin = codecs.getreader("utf-8")(sys.stdin) | |
sys.stdout = codecs.getwriter("utf-8")(sys.stdout) | |
sys.stderr = codecs.getwriter("utf-8")(sys.stderr) | |
import HTMLParser | |
h = HTMLParser.HTMLParser() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -f # no globbing, so we can safely use * | |
# other_local[joe]=:0, other_local[bob]=:1 etc. for all active local | |
# users other than us: | |
unset other_local; declare -A other_local; | |
while read -rd $'\t'; do | |
IFS=$',\n' r=($REPLY) | |
[[ "${#r[@]}" -ge 4 && "${r[4]}" != '*' && "${r[2]}" != '' && "${r[0]}" != '' ]] && other_local[${r[2]}]=${r[0]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python2 | |
t1=Thread(target=myfunction, args=('MyStringHere',)) | |
t2=Thread(target=myotherfunction, args=('MyOtherStringHere',1,10)) | |
t1.start();t2.start(); | |
t1.join();t2.join() | |
is equivalent to | |
#!/bin/bash | |
myfunction MyStringHere & P1=$! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(setq org-agenda-custom-commands '( | |
;; … | |
("p" "Agenda with and without work stuff" | |
((agenda | |
"" | |
((org-agenda-overriding-header "Life:") | |
(org-agenda-include-diary t) | |
(org-agenda-skip-function 'org-agenda-skip-work))) | |
(agenda | |
"" |
cluster vs tree layout in d3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Lesschrome popup of HTML5 video | |
// @description Lesschrome popup window of the current url; ensure you uncheck "Always show the tab bar" in Firefox tab settings | |
// @include * | |
// @version 1 | |
// @grant none | |
// ==/UserScript== | |
function obj_to_settingsstr (obj) { | |
var settingsstr = ""; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
step=10 | |
# Workaround; analog-output-headphones never works, yet is switched to | |
# whenever I plug in headphones | |
pacmd set-sink-port 0 analog-output | |
vol=$(ponymix get-volume) |