This file contains hidden or 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://djangosnippets.org/snippets/255/ | |
| http://toastdriven.com/blog/2008/nov/21/customizing-admin-part-2/ | |
| https://docs.djangoproject.com/en/1.1/ref/contrib/admin/#adding-views-to-admin-sites | |
| https://docs.djangoproject.com/en/1.1/ref/contrib/admin/actions/ | |
| http://stackoverflow.com/questions/14484369/how-to-add-top-save-button-on-django-admin-change-list |
This file contains hidden or 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 with_statement # we'll use this later, has to be here | |
| from argparse import ArgumentParser | |
| import requests | |
| from BeautifulSoup import BeautifulStoneSoup as Soup | |
| def parse_sitemap(url): | |
| resp = requests.get(url) | |
| # we didn't get a valid response, bail |
This file contains hidden or 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
| {% extends "base.html" %} | |
| {% block title %}Test django-paypal cart{% endblock %} | |
| {% block content %} | |
| <h1>Testing django-paypal cart</h1> | |
| {{ form.render }} | |
| {% endblock %} |
This file contains hidden or 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://jsbin.com/ohamub/1/edit | |
| var app = angular.module( 'app', [] ); | |
| var MyFunc = function() { | |
| this.name = "default name"; | |
| this.$get = function() { | |
| this.name = "new name" |
This file contains hidden or 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
| /*@ /\ /\ | |
| * @ / \/ \ ----- | | ---- |---\ | | /--\ --- | | ---- /--\ /--\ | |
| * @ / -- | | | | | / | | | | |\ | | | | | |
| * \---\ / \ | |---| ---- |--/ | | \ | | \ | ---- \ \ | |
| * | \------------------------/ /-\ \ | | | | | \ | | -\ | | \| | -\ -\ | |
| * | \-/ \ | | | ---- |---/ \--/ \--/ --- | \ ---- \--/ \--/ | |
| * \ ------O | |
| * \ / --- | | ---- /--\ |--\ /--\ /--\ | |
| * | | | | / | |\ | | | | | | | |
This file contains hidden or 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
| ' ROFL:ROFL:LOL:ROFL:ROFL | |
| ' ______/|\____ | |
| ' L / [] \ | |
| ' LOL===_ ROFL \_ | |
| ' L \_______________] | |
| ' I I | |
| ' /---------------/ |
This file contains hidden or 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
| // .==. .==. | |
| // //`^\\ //^`\\ | |
| // // ^ ^\(\__/)/^ ^^\\ | |
| // //^ ^^ ^/6 6\ ^^ ^ \\ | |
| // //^ ^^ ^/( .. )\^ ^ ^ \\ | |
| // // ^^ ^/\| v""v |/\^ ^ ^\\ | |
| // // ^^/\/ / `~~` \ \/\^ ^\\ | |
| // ----------------------------- | |
| /// HERE BE DRAGONS |
This file contains hidden or 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 | |
| # Script to automate creating new OpenVPN clients | |
| # The client cert and key, along with the CA cert is | |
| # zipped up and placed somewhere to download securely | |
| # | |
| # H Cooper - 05/02/11 | |
| # | |
| # Usage: new-openvpn-client.sh <common-name> | |
| # Set where we're working from |
This file contains hidden or 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 | |
| # <http://blog.philippklaus.de/2010/09/openvpn/> | |
| set -x | |
| #SERVERNAME=$(hostname) | |
| SERVERNAME=$(ifconfig | grep -A 5 eth0 | grep -w 'inet addr' | tr '\t' ' ' | cut -d ':' -f 2 | cut -d ' ' -f 1) | |
| read -e -p "Please enter the server you want your clients to connect to [default: $SERVERNAME]: " input | |
| SERVERNAME="${input:-$SERVERNAME}" |
This file contains hidden or 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 os, sys | |
| sys.path.append(os.getcwd()) | |
| import logging | |
| import rq | |
| MAX_FAILURES = 3 |