Skip to content

Instantly share code, notes, and snippets.

@dbr
dbr / dumpsafaricookies.py
Created February 3, 2010 23:04
Extract WebKit cookies for wget
#!/usr/bin/env python
"""Outputs the WebKit cookies for a specified URL.
Useful for wget'ing URLs which require authentication.
$ python thisfile.py http://example.com > wgetcookies.txt
$ wget --load-cookies wgetcookies.txt http://example.com/example.zip
"""
import objc
from Foundation import NSHTTPCookieStorage, NSURL
@dbr
dbr / nuclearPong.py
Created April 5, 2010 12:29
Pong. In Nuke.
"""Pong.
In Nuke.
"""
import nuke
import time
from random import random
import threading
@dbr
dbr / githubsync.py
Created April 21, 2010 11:43
github backup script
#!/usr/bin/env python
#
# Self contained version of:
# http://github.com/dustin/py-github/blob/master/src/githubsync.py
# (simply has github.py merged into githubsync.py)
#
# Copyright (c) 2005-2008 Dustin Sallings <dustin@spy.net>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@dbr
dbr / stmap.nk
Created August 3, 2010 12:12 — forked from julik/stmap.nk
set cut_paste_input [stack 0]
version 6.1 v1
push $cut_paste_input
Remove {
name Remove2
selected true
xpos -40
ypos -187
}
Ramp {
@dbr
dbr / githubsync.py
Created October 24, 2010 10:05
Keeps an update-to-date copy of a users Github projects
#!/usr/bin/env python
#
# Self contained version of:
# http://github.com/dustin/py-github/blob/master/src/githubsync.py
# (simply has github.py merged into githubsync.py)
#
# Copyright (c) 2005-2008 Dustin Sallings <dustin@spy.net>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@dbr
dbr / heartpython.py
Created December 11, 2010 15:52
An attempt at obfuscated Python
"""An attempt at obfuscated Python
"""
class _:
_ = []
__ = []
___ = None
____ = None
_____ = 0
@dbr
dbr / get_rated_tvdb_artwork.py
Created February 15, 2011 13:25
tvdb_api sort banners by ranking
"""Get highest ratest artwork for a series, using tvdb_api
"""
import tvdb_api
def sort_by_rating(k):
"""Given a banner dictionary, returns
"""
if 'rating' in k:
return float(k['rating'])
@dbr
dbr / ociorv.mu
Created April 26, 2011 13:48
WIP OCIO integration for RV
use rvtypes;
use app_utils;
use commands;
use extra_commands;
use rvui;
require math;
require io;
require qt;
require system;
@dbr
dbr / gist:1000603
Created May 31, 2011 14:37
OCIO iPhone(/Simulator) change required
# Diff from
# https://github.com/malcolmhumphreys/OpenColorIO/commit/3cad3b5c9e41f2938c1d7d9f50f786464a69f3f7
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7b9abd5..9688d78 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -151,8 +151,8 @@ set(YAML_CPP_STATIC_LIBRARIES ${PROJECT_BINARY_DIR}/ext/dist/lib/libyaml-cpp.a)
### Externals ###
@dbr
dbr / .screenrc
Created June 9, 2011 02:58
screen hardstatus
startup_message off
vbell off
hardstatus alwayslastline
hardstatus string '%{gk}[ %{G}%H %{g}][%= %{wk}%?%-Lw%?%{=b kR}(%{W}%n*%f %t%?(%u)%?%{=b kR})%{= kw}%?%+Lw%?%?%= %{g}]%{=y C}[%d/%m %c]%{W}'
# screen -t sometitle 0 somecommand
# screen -t secondtitle 1 anothercommand