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
/** | |
* Adds event triggering whenever an append takes place. | |
* | |
* - Parent is given an "append" trigger with the child as an arguement | |
* - Child is given an "appended" trigger with the parent as an argument | |
* | |
* @author Jessey White-Cinis <[email protected]> | |
*/ | |
(function($) { | |
var jqueryAppend = $.fn.append; |
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
<?php | |
class EmailSignup { | |
private $db; | |
// defaults can be overwritten on instantiation | |
private $filename = "emailsignups.sqlite"; | |
private $tablename = "emails"; |
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 random import choice | |
from string import ascii_lowercase, digits | |
from django.contrib.auth.models import User | |
def generate_random_username(length=16, chars=ascii_lowercase+digits, split=4, delimiter='-'): | |
username = ''.join([choice(chars) for i in xrange(length)]) | |
if split: | |
username = delimiter.join([username[start:start+split] for start in range(0, len(username), split)]) |
NewerOlder