This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# bash completion support for core Git. | |
# | |
# Copyright (C) 2006,2007 Shawn O. Pearce <[email protected]> | |
# Conceptually based on gitcompletion (http://gitweb.hawaga.org.uk/). | |
# Distributed under the GNU General Public License, version 2.0. | |
# | |
# The contained completion routines provide support for completing: | |
# | |
# *) local and remote branch names |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Copyright (c) 2009, Sean Creeley | |
All rights reserved. | |
Redistribution and use in source and binary forms, with or without modification, | |
are permitted provided that the following conditions are met: | |
* Redistributions of source code must retain the above copyright notice, this | |
list of conditions and the following disclaimer. | |
* Redistributions in binary form must reproduce the above copyright notice, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl -w | |
use strict; | |
# This file clumsily extracts the DB's hidden in the iPhone backup files | |
# Usage: perl -w bkupextract.pl /Users/flip/Library/Application\ Support/MobileSync/Backup/*/* | |
my %seen; | |
foreach my $filename (@ARGV) { | |
# Slurp File Contents |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from __future__ import division | |
from numpy.fft import rfft | |
from numpy import argmax, mean, diff, log, nonzero | |
from scipy.signal import blackmanharris, correlate | |
from time import time | |
import sys | |
try: | |
import soundfile as sf | |
except ImportError: | |
from scikits.audiolab import flacread |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.conf import settings | |
from django.utils.http import urlquote | |
from django import http | |
class EnforceHostnameMiddleware(object): | |
""" | |
Enforce the hostname per the ENFORCE_HOSTNAME setting in the project's settings | |
The ENFORCE_HOSTNAME can either be a single host or a list of acceptable hosts | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Apple Binary Property List serializer for Ruby 1.8. | |
require 'iconv' | |
module AppleBinaryPropertyList | |
MIME_TYPE = 'application/octet-stream' # Don't know what to use, so use a very generic type for now | |
CFData = Struct.new(:data) # For marking strings as binary data which will be decoded as a CFData object | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Sample custom iterator. | |
// By perfectly.insane (http://www.dreamincode.net/forums/index.php?showuser=76558) | |
// From: http://www.dreamincode.net/forums/index.php?showtopic=58468 | |
#include <iostream> | |
#include <vector> | |
#include <algorithm> | |
#include <iterator> | |
#include <cassert> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.db import models | |
class Top(models.Model): | |
_counter = 0 | |
def __init__(self, arg): | |
Top._counter += 1 | |
print "Top(%s)#__init__(<%x>, %s) called %d times" % ( | |
self.__class__.__name__, id(self), arg, Top._counter) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Ported from Stefan Gustavson's java implementation | |
// http://staffwww.itn.liu.se/~stegu/simplexnoise/simplexnoise.pdf | |
// Read Stefan's excellent paper for details on how this code works. | |
// | |
// Sean McCullough [email protected] | |
/** | |
* You can pass in a random number generator object if you like. | |
* It is assumed to have a random() method. | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
#################################### | |
# iTunes Command Line Control v1.0 | |
# written by David Schlosnagle | |
# created 2001.11.08 | |
# edit 2010.06.01 rahul kumar | |
#################################### | |
showHelp () { |
OlderNewer