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 boto | |
schema = conn.create_schema( | |
hash_key_name='player_id', | |
hash_key_proto_value='S', | |
range_key_name='points', | |
range_key_proto_value='N' | |
) | |
table = conn.create_table( |
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 os | |
from django.db.models import Count | |
from jmc.anus.models import Track, Release | |
from jmc.auth import User | |
track_root = '../..' | |
jokull_root = '/web/jmc/tracks/jokull' | |
j = User.objects.get(username='jokull') |
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 | |
# encoding=utf-8 | |
import sys | |
import os | |
import re | |
import subprocess | |
from clint.textui import prompt | |
from clint.textui.core import puts, puts_err | |
from clint.textui.colored import blue, yellow, red |
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 directoryhash import path_checksum | |
from functools import partial | |
def static(filename, _external=False): | |
path = partial(url_for, 'static', filename=filename, _external=_external) | |
host = app.config.get('CDN_HOSTNAME') | |
if host: | |
return u'http://{host}/{fingerprint}{path}'.format( | |
host=host, fingerprint=g.fingerprint, path=path()) | |
return path(fingerprint=g.fingerprint) |
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 window.Tweet extends Backbone.Model | |
initialize: (options) -> | |
if @has "text" | |
tweet = @ify.hash (@get "text") | |
tweet = @ify.at tweet | |
tweet = @ify.link tweet | |
@set ified: tweet | |
ify: |
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
# encoding=utf-8 | |
import datetime, locale | |
from functools import partial | |
from urllib import quote_plus | |
from raven.contrib.flask import Sentry | |
from redis import Redis | |
from flask import (Flask, g, url_for, render_template, request, jsonify, abort, | |
redirect) |
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
// Based on getskeleton.com | |
@import "nib/clearfix" | |
@import "nib/reset" | |
global-reset() | |
columns = 16 | |
column-width = 57px // Ends up as 1232px layout | |
gutter-width = 20px |
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
# encoding=utf-8 | |
""" | |
Use Tumblr as a backend for a blog. This module | |
helps interfacing with their APIv2 in a pythonic way. Caching | |
keeps things responsive and guards against API downtime and | |
response failures. | |
Assumptions: |
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
<html> | |
<head> | |
<script type="text/template" id="tpl-instagram-post"> | |
<a href="<%= link %>"><img src="<%= images.low_resolution.url %>"></a> | |
<p class="date"><%= created_time %></p> | |
<p class="user">@<%= user.username %></p> | |
<% if(caption){ %> | |
<p class="caption"><%= caption.text %></p> | |
<% } %> | |
</script> |
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
<html> | |
<head> | |
<script type="text/template" id="tpl-tumblr-post"> | |
<% if(title){ %> | |
<h2 class="title"> | |
<a href="<%= post_url %>"><%= title %></a> | |
</h2> | |
<% } %> | |
<%= body %> |