Skip to content

Instantly share code, notes, and snippets.

@quanticle
quanticle / gist:846884
Created February 28, 2011 03:09
set_wallpaper error
File "set_wallpaper.py", line 112, in <module>
db['size'] = get_resolution()
File "set_wallpaper.py", line 67, in get_resolution
out = Popen(['xrandr'], stdout=PIPE, stderr=PIPE).communicate()[0]
File "C:\Python27\lib\subprocess.py", line 672, in __init__
errread, errwrite)
File "C:\Python27\lib\subprocess.py", line 882, in _execute_child
startupinfo)
WindowsError: [Error 2] The system cannot find the file specified
@quanticle
quanticle / count.py
Created October 10, 2012 06:18
Counting
#! /usr/bin/python
ones = [ "",
"one",
"two",
"three",
"four",
"five",
"six",
"seven",
"eight",
@quanticle
quanticle / counting.py
Created October 10, 2012 06:43
Counting
#! /usr/bin/python
ones = [ "",
"one",
"two",
"three",
"four",
"five",
"six",
"seven",
"eight",
@quanticle
quanticle / gist:3984966
Created October 31, 2012 05:18
The error page when I remove quotes around socialauth_begin
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="robots" content="NONE,NOARCHIVE">
<title>NoReverseMatch at /</title>
<style type="text/css">
html * { padding:0; margin:0; }
@quanticle
quanticle / gist:4122787
Created November 21, 2012 03:14
Style 9 rage
struct foo {
struct foo *next; /* List of active foo. */
struct mumble amumble; /* Comment for mumble. */
int bar; /* Try to align the comments. */
struct verylongtypename *baz; /* Won't fit in 2 tabs. */
};
struct foo *foohead; /* Head of global foo list. */
@quanticle
quanticle / gist:4173904
Created November 30, 2012 05:20
Indent example
foo = {"hello": "world",
"foo": "bar",
"baz": "echo"}
a = 3
short = 4
reallyLong = 5
evenlongervar = 6
ThisIsAVarThatsOnlyFoundInJava = 7
@quanticle
quanticle / gist:4173933
Created November 30, 2012 05:29
Indent example
foo = ["bar"
"bar",
"bar",
"bar",
"bar",
"bar",
"bar",
"bar",
"bar",
"bar"];
@quanticle
quanticle / gist:4173953
Created November 30, 2012 05:39
Lisp alignment
(defn func-foo [arg1 arg2 arg3]
(let bar (+ arg1 arg2)
(let baz (+ bar arg3)
(cond (= (% baz 2) 0)
(handle-even baz)
(handle-odd baz)))))
@quanticle
quanticle / test.clj
Created December 1, 2012 07:06
test.txt
;; This is a clojure file