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
class IProfileMetadata(Interface): | |
""" Provides contextual profile metadata | |
""" | |
title = Attribute(u'Profile title') | |
description = Attribute(u'Profile description') | |
biography = Attribute(u'Profile biography') | |
image = Attribute(u'Profile image') | |
url = Attribute(u'The url to the profile page') | |
dq = Attribute(u'The user\'s Design Quotient') |
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
alias cleanflymake='find . -type f -name "*_flymake*" -exec rm -f {} \;' | |
alias cleanpyc='find . -type f -name "*.pyc" -exec rm -f {} \;' |
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 | |
"""Create a "virtual" Python installation | |
""" | |
virtualenv_version = "1.4.3.post1" | |
import sys | |
import os | |
import optparse | |
import re |
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
import redis | |
from zope.interface import Interface, implements | |
try: #pragma NO COVERAGE | |
import simplejson as json | |
except ImportError: #pragma NO COVERAGE | |
import json | |
class RedisSession(dict): | |
""" Provides a lazy interface for presenting data stored in a redis DB as a |
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
Then run the 2 mysql servers with: | |
/usr/local/bin/mysqld_multi start --tcp-ip 1,2 |
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
$ gonzo config --cloud staging | |
$ gonzo launch staging-app | |
$ gonzo list | |
staging-app-001 m1.small ACTIVE junkafarian 0d 00h 05m 3s |
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
/* | |
JavaScript Test | |
--------------- | |
A small script to open a popup when clicking a link. | |
Once you click on the button, clinking on it again will close the popup. | |
*/ | |
/* Task One - Improve this code |
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
// The expensive animation is causing performance issues. Write the function 'yourFunction' that reduces calls to the animation. | |
function scrollHandler() { | |
var items = document.querySelectorAll('.list-item'); | |
var i = 0; | |
var len = items.length; | |
for(; i < len; i++) { | |
// perform expensive animation | |
} |