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
gldnspud / creating_functions.py
Created Mar 5, 2013
Programmatically creating functions
View creating_functions.py
# 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)
requests.get(generic_site_url)
# ... that is returned by the factory function.
return generic_site_submit
@gldnspud
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
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
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 http://sourceforge.net/projects/retroshare/files/RetroShare/0.5.3c/RetroShare-v0.5.3c.tar.gz/download
$ tar xzvf RetroShare-v0.5.3c.tar.gz
$ cd trunk/libbitdht/src
$ qmake && make
@gldnspud
gldnspud / gist:2788909
Created May 25, 2012
https://my.webfaction.com/make-payment source - locks up on Chrome version 21.0.1150.3 (Official Build 138970) canary
View gist:2788909
<!doctype html>
<html lang="en">
<head>
<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="https://my.webfaction.com/media/css/screen.r1337180865.css" rel="stylesheet" type="text/css" />
@gldnspud
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
gldnspud / FUCKCIT.PIE.c
Created May 15, 2012
FuckCitPie general release version 5.12
View FUCKCIT.PIE.c
/*
95Apr17 From golden spud @ Golden Spud's Greasehouse, matt.org
Also,
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
gldnspud / configure.ac.patch
Created Feb 7, 2012
Bump down autoconf version requirement to 2.61
View configure.ac.patch
--- configure.ac.orig 2012-02-07 12:22:59.000000000 -0600
+++ configure.ac 2012-02-07 12:23:23.000000000 -0600
@@ -32,7 +32,7 @@
# Basic initialisations
#################################################
-AC_PREREQ(2.62)
+AC_PREREQ(2.61)
AC_INIT([libmp3splt],[0.7.1],[io_fx@yahoo.fr])
AC_CONFIG_AUX_DIR([libltdl/config])
View autogen.sh.patch
diff --git a/autogen.sh b/autogen.sh
index 68962f2..7e09d60 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -1,14 +1,15 @@
#!/bin/sh
win=$1
-#autopoint check
-(autopoint --version) > /dev/null 2>&1 ||
View gist:1383134
/* analogtv, Copyright (c) 2003, 2004 Trevor Blackwell <tlb@tlb.org>
*
* 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.