Skip to content

Instantly share code, notes, and snippets.

mydict = {}
mydict['penis'] = "boner"
def thing_one():
for k,v in mydict.items():
print "%s %s" % (k,v)
def thing_two():
for k,v in mydict.items():
print "%s %s" % (k,v)
@farces
farces / a thing.py
Last active December 14, 2015 01:59
from tkinter import *
class App:
def __init__(self, master):
frame = Frame(master)
frame.pack()
self.start = Button(frame, text = "Begin", command = self.start_up)
self.start.pack()
@farces
farces / gist:4054982
Created November 11, 2012 14:06
SOME THING
// ==UserScript==
// @name Lurk-More-5-Golden-Manbabies
// @version 5.5.5
// @namespace https://github.com/stuartdb/lurk-more
// @author Stuart Baker + THE GRIPPER
// @description Allows quickly opening your bookmarked threads which have new posts on SA.
// @include *://forums.somethingawful.com/*
// @grant GM_openInTab
// @run-at document-end
// ==/UserScript==
@farces
farces / gist:3888239
Created October 14, 2012 10:50
sample dumb assembly thing
void main() {
int i = 0;
while (i < 10) {
printf("Added 1 to i\n");
i++;
}
printf("Done!\n");
printf("Doing some assembly\n");
/* replicate "while (i < 20) { i++; }" from assembly output.
@farces
farces / Go.sublime-build
Created April 16, 2012 16:37
Sample (working) Go.sublime-build for SublimeGoBuild
{
"target": "go_build",
"type": "BUILD",
"selector": "source.go"
}
@farces
farces / py.cpp
Created February 17, 2012 03:51
Python Extending
// py.cpp : Defines the entry point for the console application.
//
#include <Python.h>
#include <math.h>
/* This method will be exported as part of the test_embed package for use in imported
python modules:
import test_embed
test_embed.emb_pow(x,y)