Skip to content

Instantly share code, notes, and snippets.

Matthew R. Scott gldnspud

Block or report user

Report or block gldnspud

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
gldnspud /
Created Mar 5, 2013
Programmatically creating functions
# This could be called a "function factory".
# It is a function that creates, then returns, new functions.
def generic_site_fn(url_template):
# Define an inner function ...
def generic_site_submit(url):
generic_site_url = url_template.format(url=url)
# ... that is returned by the factory function.
return generic_site_submit
gldnspud / gist:3947224
Created Oct 24, 2012
Use of functools.partial instead of using a closure
View gist:3947224
from functools import partial
def tracecalls(cls):
def my__getattribute__(self, name):
attr = super(cls, self).__getattribute__(name)
return attr if not callable(attr) else partial(whencalled, attr)
cls.__getattribute__ = my__getattribute__
gldnspud / uninitialized.enaml
Created Jun 30, 2012
Component uninitialized; attr changes do not propagate as expected
View uninitialized.enaml
# System:
# OSX 10.7.4
# Qt 4.8.0
# PySide 1.1.1
from enaml.stdlib.radio_group import RadioGroup
DEFAULT_TRIGGER_METHOD_NAME = 'request_refresh_task'
gldnspud / gist:2913909
Created Jun 12, 2012
Installing retroshare on Debian Squeeze
View gist:2913909
This is what worked for me to install it on Squeeze 64-bit:
$ sudo aptitude install libqt4-dev g++ libgpgme11-dev libgpg-error-dev libupnp-dev libssl-dev libgnome-keyring-dev libxss-dev gnupg-agent
If this asks you to remove packages, DO NOT CONTINUE. The above line should only INSTALL packages. Fix your system first.
$ wget
$ tar xzvf RetroShare-v0.5.3c.tar.gz
$ cd trunk/libbitdht/src
$ qmake && make
gldnspud / gist:2788909
Created May 25, 2012 source - locks up on Chrome version 21.0.1150.3 (Official Build 138970) canary
View gist:2788909
<!doctype html>
<html lang="en">
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<title>WebFaction Control Panel</title>
<meta name="description" content="The WebFaction control panel. This site allows WebFaction customers to manage their accounts and websites." />
<link href="" rel="stylesheet" type="text/css" />
gldnspud / FindPanelLayoutAppDelegate.m
Created May 22, 2012
enaml constraints vs Cocoa Auto Layout
View FindPanelLayoutAppDelegate.m
File: FindPanelLayoutAppDelegate.m
Abstract: Creates interface elements and lays out the window
Version: 1.2
Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple
Inc. ("Apple") in consideration of your agreement to the following
terms, and your use, installation, modification or redistribution of
this Apple software constitutes acceptance of these terms. If you do
not agree with these terms, please do not use, install, modify or
gldnspud / FUCKCIT.PIE.c
Created May 15, 2012
FuckCitPie general release version 5.12
95Apr17 From golden spud @ Golden Spud's Greasehouse,
BRENT. After you left the "not-together", DP, scorpio, and I wrote a Citadel
in less than 30 minutes on FRuG's computer, in Borland C++.
We aptly named it FuckCitPie release 5.12, and everybody else that was still
there challenged us to run two instances of it at the same time and see if it
would multitask.
gldnspud /
Created Feb 7, 2012
Bump down autoconf version requirement to 2.61
--- 2012-02-07 12:22:59.000000000 -0600
+++ 2012-02-07 12:23:23.000000000 -0600
@@ -32,7 +32,7 @@
# Basic initialisations
diff --git a/ b/
index 68962f2..7e09d60 100755
--- a/
+++ b/
@@ -1,14 +1,15 @@
-#autopoint check
-(autopoint --version) > /dev/null 2>&1 ||
View gist:1383134
/* analogtv, Copyright (c) 2003, 2004 Trevor Blackwell <>
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
* the above copyright notice appear in all copies and that both that
* copyright notice and this permission notice appear in supporting
* documentation. No representations are made about the suitability of this
* software for any purpose. It is provided "as is" without express or
* implied warranty.
You can’t perform that action at this time.