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
<html> | |
<head> | |
<title>QR Code Generator</title> | |
<style type="text/css"> | |
#container { | |
width: 800px; | |
margin: auto; | |
} | |
#generator { | |
width: 350px; |
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 | |
# Run a command as the postgres user | |
AS_POSTGRES="sudo -u postgres" | |
# Set path to postgresql contrib path | |
POSTGIS_SQL_PATH=/usr/share/postgresql/9.1/contrib | |
#Create the template spatial database | |
$AS_POSTGRES createdb -E UTF8 -T template0 template_postgis |
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
/* Renders a web page to an image. */ | |
var address = phantom.args[0]; | |
var outfile = phantom.args[1]; | |
var width = phantom.args[2] || 1440; | |
var height = phantom.args[3] || 900; | |
var page = new WebPage(); | |
var data = { |
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
# After cloing a git repo with submodules: | |
git submodule init | |
git submodule update | |
# To later update these submodules: | |
git submodule foreach git pull origin master |
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.template import Node, Library | |
import urllib | |
register = Library() | |
class URLEncodeNode(Node): | |
def __init__(self, nodes, plus=False): | |
self.nodes = nodes |
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.template import Library, Node, Variable, \ | |
VariableDoesNotExist, TemplateSyntaxError | |
register = Library() | |
def get_var(v, context): | |
try: | |
return v.resolve(context) | |
except VariableDoesNotExist: | |
return v.var |
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 | |
sudo apt-get install python-software-properties | |
sudo add-apt-repository ppa:cassou/emacs | |
sudo apt-get autoremove --purge emacs* | |
sudo apt-get update | |
sudo apt-get install emacs24-nox |
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
wget --output-document=/dev/null http://speedtest.wdc01.softlayer.com/downloads/test500.zip |
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
description "Play" | |
env USER=user | |
env GROUP=group | |
env HOME=/opt/yourapp | |
env JAVA=/usr/bin/java | |
env JAVA_OPTS="-cp ./staged/* play.core.server.NettyServer ./.." | |
env PORT=80 | |
env EXTRA="-Xms128M -Xmx512m -server" |
OlderNewer