- http://www.youtube.com/watch?feature=player_embedded&v=eJZx9c6YL8k#!
- http://usablica.github.com/front-end-frameworks/compare.html?v=2.0
- https://github.com/pagespeed/ngx_pagespeed#how-to-use
- http://docs.angularjs.org/tutorial/step_04
- http://stephanebegaudeau.tumblr.com/post/48776908163/everything-you-need-to-understand-to-start-with
- https://devcenter.heroku.com/articles/nodejs
- https://github.com/viatropos/tower
- http://blog.mongodb.org/post/49262866911/the-mean-stack-mongodb-expressjs-angularjs-and
- http://www.unheap.com/
- https://github.com/notanumber/django-vagrant?buffer_share=addd7&utm_source=buffer&utm_medium=twitter&utm_campaign=Buffer%253A%252BPythonWeekly%252Bon%252Btwitter
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
var song = new Backbone.Model({ | |
title: "Lucy In The Sky With Diamonds", | |
album: new Backbone.Model({ | |
title: "Sgt. Pepper's Lonely Hearts Club Band", | |
release: { | |
year: "1987" | |
} | |
}) | |
}); |
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
import math | |
import random | |
import operator | |
from django.contrib.gis.geos import LineString, Point | |
from scenicroute.apps.hunts.routing.triangulation import ( | |
build_triangulation, START_INDEX, END_INDEX) | |
from scenicroute.apps.hunts.routing.culling import no_dupes | |
from scenicroute.apps.hunts.routing.estimation import (duration_for_distance, |
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
#! /usr/bin/env python | |
from boto.ses.connection import SESConnection | |
import sys | |
import subprocess | |
import socket | |
if __name__ == '__main__': | |
return_code = 'unknown' | |
host = socket.getfqdn() | |
try: |
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
#! /usr/bin/env python | |
import redis | |
import random | |
import pylibmc | |
import sys | |
r = redis.Redis(host = 'localhost', port = 6389) | |
mc = pylibmc.Client(['localhost:11222']) |
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
def apply_filters(self, request, applicable_filters): | |
""" | |
An ORM-specific implementation of ``apply_filters``. | |
The default simply applies the ``applicable_filters`` as ``**kwargs``, | |
but should make it possible to do more advanced things. | |
""" | |
positive_filters = {} | |
negative_filters = {} | |
for lookup in applicable_filters.keys(): |
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
import requests | |
for x in xrange(0, 40000): | |
r = requests.get('http://127.0.0.1:8080/solr/select') | |
assert r.status_code == 200, r.status_code | |
print r.content |
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
--- | |
- name: SSH tightening | |
hosts: all | |
sudo: True | |
tasks: | |
- name: Disable root's ssh account | |
action: > | |
lineinfile | |
dest=/etc/ssh/sshd_config |
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: http://www.reddit.com/r/Python/comments/2lzry9/most_efficient_way_to_generate_random_dataevents/clzoj3t | |
head -c <large number> /dev/zero ¦ tr '\0' '\n' ¦ cat -n ¦ xargs -L1 printf 'This is message number %s\n' |
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 itertools import chain, product | |
from re import match, findall | |
GRAMMAR = ''' | |
<sentence> ::= <noun phrase=""> <verb phrase=""> | |
<noun> ::= "boy " | "troll " | "moon " | "telescope " | |
<transitive verb=""> ::= "hits " | "sees " | |
<intransitive verb=""> ::= "runs " | "sleeps " | |
<adjective> ::= "big " | "red " |