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/env python | |
import functools, logging | |
from django.utils import simplejson | |
def safeweb(srcfunc): | |
def decorated(self, *vargs, **kwargs): | |
try: | |
return srcfunc(self, *vargs, **kwargs) |
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/env python | |
import datetime | |
from django.utils import simplejson | |
def jsondefault(self, data): | |
#### logging.warn( data ) | |
if isinstance(data , datetime.date ): | |
data = data.strftime("%Y-%m-%d") | |
if isinstance(data , datetime.datetime ): |
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/sh -x | |
#svnadmin create file:$PWD/$( basename $1 ) | |
URL1=$( echo $1 | sed -e 's/\/trunk\///' ) | |
NAMING=$( echo $URL1 | sed -e 's/\/\/*/\//g;s/\/$//' | rev | cut -d/ -f1-2 | rev | tr / _ ) | |
echo $URL1 | |
echo $NAMING | |
###exit | |
NAMING=SVFS-$NAMING | |
svnadmin create $NAMING | |
( echo "#!/bin/sh" ; echo exit 0 ) > $NAMING/hooks/pre-revprop-change |
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
$HTTP["url"] =~ "^/~.+/" { | |
cgi.assign = ( | |
# ".pl" => "/usr/bin/perl", | |
# ".php" => "/usr/bin/php5-cgi", # FASTCGI | |
".py" => "/usr/bin/python", | |
".cgi" => "/usr/sbin/lighttpd-suexec" | |
) | |
} |
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 | |
# Ported from C to Perl by Anders Bergh <anders1@gmail.com> | |
# Some Perlification by John Gabriele (4-24-2007). | |
use strict; | |
use warnings; | |
use Time::HiRes qw( gettimeofday ); | |
my $BAILOUT = 16; | |
my $MAX_ITERATIONS = 1000; |
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/tclsh | |
# Optimized Version by Samuel Zafrany | |
# Ported from C by Anders Bergh <anders1@gmail.com> | |
package require Tcl 8.4 | |
set BAILOUT 16 | |
set MAX_ITERATIONS 1000 |
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
curl http://gist.github.com/gists/574260/download | tar xfz - | |
mv ./gist*/test.sh test.sh | |
chmod u+x test.sh | |
./test.sh |
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
if os.isatty(sys.stderr.fileno() ): | |
logging.getLogger().setLevel(logging.DEBUG) | |
logging.basicConfig( format='%(asctime)s %(levelname)s %(module)s:%(lineno)s %(message)s' ) |
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
#define _LP64 1 | |
#define __CHAR_BIT__ 8 | |
#define __DBL_DENORM_MIN__ 4.9406564584124654e-324 | |
#define __DBL_DIG__ 15 | |
#define __DBL_EPSILON__ 2.2204460492503131e-16 | |
#define __DBL_HAS_INFINITY__ 1 | |
#define __DBL_HAS_QUIET_NAN__ 1 | |
#define __DBL_MANT_DIG__ 53 | |
#define __DBL_MAX_10_EXP__ 308 | |
#define __DBL_MAX_EXP__ 1024 |
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/env python | |
#https://gist.github.com/635194 | |
import logging | |
from google.appengine.ext import db | |
__all__ = [ | |
"bulkinsert", | |
] |
OlderNewer