Skip to content

Instantly share code, notes, and snippets.

View matthewryanscott's full-sized avatar

Matthew R. Scott matthewryanscott

View GitHub Profile
@matthewryanscott
matthewryanscott / configure.ac.patch
Created February 7, 2012 18:25
Bump down autoconf version requirement to 2.61
--- 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],[[email protected]])
AC_CONFIG_AUX_DIR([libltdl/config])
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 ||
@matthewryanscott
matthewryanscott / gist:1383134
Created November 21, 2011 16:25
analogtv.c
/* analogtv, Copyright (c) 2003, 2004 Trevor Blackwell <[email protected]>
*
* 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.
*/
@matthewryanscott
matthewryanscott / jed.bas
Created August 28, 2011 04:06
Jed's Other Poem
900 REM *** CURSOR VARIABLES **
*
910 SPEED= 255
920 MDY% = 260
930 DLY% = MDY%
940 CHAR$ = ""
950 X = 1
960 Y = 1
970 DIR = 1
1000 REM *** BOOT SEQUENCE ***
@matthewryanscott
matthewryanscott / all-project-hashes.py
Created May 23, 2011 00:15
Inspect all sibling directories, and show current git revisions for each that is a git repo.
#!/usr/bin/env python2.6
"""Inspect all sibling directories, and show current git revisions for each that is a git repo."""
import re
import sys
import os
import subprocess
MODULE_PATH = os.path.abspath(os.path.dirname(sys.argv[0]))
@matthewryanscott
matthewryanscott / update-requirements-hashes.py
Created May 20, 2011 18:54
Updates git hashes in requirements.txt files based on current state of adjacent repositories.
#!/usr/bin/env python2.6
"""Updates git hashes in requirements.txt files based on current state of adjacent repositories.
Expects to be run inside directory containing requirements.txt to be updated.
Be sure to commit regularly: Performs an in-place update of requirements.txt.
"""
import re
import sys
from teams.models import Team
from zipcodes.models import ZipCode, County
Z = list(ZipCode.objects.all())
for team in Team.objects.all():
for zip_code in team.zip_codes.all():
if zip_code in Z:
Z.remove(zip_code)
for county in team.counties.all():
# Here's a way to "snapshot" the modules already loaded by
# Python, so you can go back to that snapshot at a later point in
# time by causing Python to forget about modules already loaded.
#
# The modules still exist if you have any objects pointing to them,
# but when an import statement or __import__ call is encountered,
# Python will look for the module again and load it as if it were
# never imported in the first place.
#
# This is useful when you lazily import modules, such as in the
# The general idea is to attach a sequence to an object upon instantiation.
# When creating kwargs to pass to dict(), Python evaluates each expression
# in the order written, and thus each Field instance in this example has
# a _number attribute that corresponds to the order in which it was written
# in source code.
class Field(object):
_last_number = 0
def __init__(self, **kw):
self.__dict__.update(kw)
@matthewryanscott
matthewryanscott / gist:246859
Created December 2, 2009 02:01
talking between qt widget and javascript
import os
import sys
from PyQt4 import uic
from PyQt4.QtCore import QSize, Qt, QTimer, pyqtProperty, pyqtSignal, pyqtSlot
from PyQt4.QtGui import *
from PyQt4.QtWebKit import *
html = \
"""<html>