- lxml - Pythonic binding for the C libraries libxml2 and libxslt.
- boto - Python interface to Amazon Web Services
- Django - Django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design.
- Fabric - Library and command-line tool for streamlining the use of SSH for application deployment or systems administration task.
- PyMongo - Tools for working with MongoDB, and is the recommended way to work with MongoDB from Python.
- Celery - Task queue to distribute work across threads or machines.
- pytz - pytz brings the Olson tz database into Python. This library allows accurate and cross platform timezone calculations using Python 2.4 or higher.
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
vbabiy@app13:/etc/varnish$ curl -X PURGE -H "Host: www.smithsonianmag.com" http://127.0.0.1:6081/travel/underwater-museum-180951559/ -I | |
HTTP/1.1 200 Purged. | |
Server: Varnish | |
Content-Type: text/html; charset=utf-8 | |
Content-Length: 9218 | |
Accept-Ranges: bytes | |
Date: Thu, 12 Jun 2014 19:13:06 GMT | |
X-Varnish: 1816509156 | |
Age: 0 | |
Via: 1.1 varnish |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
Error: Syntax error, unrecognized expression: <form ng-controller="DeleteMonitorModalCtrl"> | |
<p class="message hr"> | |
Are you sure you want to delete this monitor? Your new monthly total will be <b>{{ total | currency }}</b>. | |
</p> | |
<div class="buttons"> | |
<button type="submit" ng-click="success(monitor)">Yes</button> | |
<button type="button" ng-click="failure()">No</button> | |
</div> | |
</form> | |
at Function.Sizzle.error (http://localhost:8000/static/bower_components/jquery/jquery.js:4421:8) |
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
nginx: | |
pkg: | |
- installed | |
service: | |
- running | |
- require: | |
- pkg: nginx | |
- watch: | |
- file: /etc/nginx/sites-enabled/{{ pillar['application']['name'] }} |
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
ppa: | |
pkgrepo.managed: | |
- ppa: chris-lea/node.js | |
- require_in: | |
- pkg: nodejs | |
- pkg: npm |
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
nodejs: | |
pkg.installed: | |
- pkgs: | |
- nodejs: '0.10.18-1chl1~precise1' | |
- npm |
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
class TestHome(TestCase): | |
def get_home(self): | |
return self.client.get('/') | |
def test_home_template_used(self): | |
self.assertTemplateUsed(self.get_home(), 'home.html') | |
def test_home_template_contains_hello_world(self): | |
self.assertContains(self.client.get('/'), 'Hello World') |
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
class TestHome(TestCase): | |
def test_home_template_used(self): | |
res = self.get_name() | |
self.assertTemplateUsed(res, 'home.html') | |
def get_name(self): | |
res = self.client.get('/') | |
return res | |
def test_home_template_contains_hello_world(self): |
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 rest_framework.parsers import JSONParser | |
from django.conf import settings | |
import re | |
import json | |
first_cap_re = re.compile('(.)([A-Z][a-z]+)') | |
all_cap_re = re.compile('([a-z0-9])([A-Z])') | |
def camel_to_underscore(name): | |
s1 = first_cap_re.sub(r'\1_\2', name) |
NewerOlder