Skip to content

Instantly share code, notes, and snippets.

# first ensure you've got libffi installed
# macports
port install libffi
# homebrew
brew install libffi
# ubuntu
apt-get install libffi-dev
# this will install pyOpenSSL along with these others:
# cryptography cffi six pycparser
# this will install the python client along with these others:
# httplib2 oauth2client uritemplate pyasn1 pyasn1-modules rsa simplejson
pip install google-api-python-client
from __future__ import absolute_import
from django.views.generic import TemplateView
class FontsView(TemplateView):
template_name = 'offline/fonts.css'
content_type = 'text/css'
/*
* For font license information, see the CSS file loaded by this JavaScript.
*/
if(!window.Typekit)window.Typekit={};window.Typekit.config={"c":[".tk-freight-sans-pro","\"freight-sans-pro\",\"Helvetica\",\"Arial\",sans-serif"],"f":"/offline/fonts/","fn":["freight-sans-pro",["i3","i5","n3","n4","n5","n6"]],"k":"//use.typekit.net/{id}.js","p":"//p.typekit.net/p.gif?s=1&k=lfz0vxv&ht=tk&h={host}&f=10954.13456.13457.13458.13459.13460&a=671597&_={_}","w":"lfz0vxv"};
/*{"k":"1.7.0","created":"2014-01-09T10:53:52Z"}*/
;(function(window,document,undefined){
[...]
})(this,document);
<script type="text/javascript" src="{% static 'offline/typekit.js' %}"></script>
<script type="text/javascript">try{Typekit.load();}catch(e){}</script>
/*
Original
https://use.typekit.net/c/7302fd/1w;freight-sans-pro,1,TJ9:N:i3,TJF:N:i5,TJ8:N:n3,TJB:N:n4,TJD:N:n5,TJG:N:n6/d?3bb2a6e53c9684ffdc9a9bf11e5b2a6273d805f491df729128ca517d0b865e0e191e7b5aee445efc6d4ab4dc94e67aefe35eac8915e2de0959b2bb14cb74eb97243001a4e12199258e040dfe98f737ffac5827d670b2821c337b4c001b82bb67b53127b8ef655ac395a8807eadc56b96dfce3ebaeaf23eda54a42b78fd6598bf206c475067f1648d3f4fcce42c1c8687de1fd8c8d7fdc3934dc65b290046cea982d0a7ac4abb5c8f802f88867e69
*/
/*{"c":"2014-10-30T14:18:23Z","s":"prod-origin-fd43d310","v":"9b86fd"}*/
/*
* The Typekit service used to deliver this font or fonts for use on websites
* is provided by Adobe and is subject to these Terms of Use
* http://www.adobe.com/products/eulas/tou_typekit. For font license
<script type="text/javascript" src="//use.typekit.net/lfz0vxv.js"></script>
<script type="text/javascript">try{Typekit.load();}catch(e){}</script>
/*
Original
https://use.typekit.net/lfz0vxv.js
*/
/*
* For font license information, see the CSS file loaded by this JavaScript.
*/
if(!window.Typekit)window.Typekit={};window.Typekit.config={"c":[".tk-freight-sans-pro","\"freight-sans-pro\",\"Helvetica\",\"Arial\",sans-serif"],"f":"//use.typekit.net/c/7302fd/1w;freight-sans-pro,1,TJ9:N:i3,TJF:N:i5,TJ8:N:n3,TJB:N:n4,TJD:N:n5,TJG:N:n6/{format}{/extras*}?3bb2a6e53c9684ffdc9a9bf11e5b2a6273d805f491df729128ca517d0b865e0e191e7b5aee445efc6d4ab4dc94e67aefe35eac8915e2de0959b2bb14cb74eb97243001a4e12199258e040dfe98f737ffac5827d670b2821c337b4c001b82bb67b53127b8ef655ac395a8807eadc56b96dfce3ebaeaf23eda54a42b78fd6598bf206c475067f1648d3f4fcce42c1c8687de1fd8c8d7fdc3934dc65b290046cea982d0a7ac4abb5c8f802f88867e69","fn":["freight-sans-pro",["i3","i5","n3","n4","n5","n6"]],"k":"//use.typekit.net/{id}.js","p":"//p.typekit.net/p.gif?s=1&k=lfz0vxv&ht=tk&h={host}&f=10954.13456.13457.13458.13459.13460&a=671597&_={_}","w":"lfz0vxv"};
/*{"k":"1.7.0","created":"2014-01-09T10:53:52
rsync -rave "ssh -i /path/to/EC2_KEY.pem" /path/to/local/files/* EC2_USER@EC2_INSTANCE:/path/to/remote/files
from boto.s3.connection import S3Connection
connection = S3Connection('aws access key', 'aws secret key')
buckets = connection.get_all_buckets()
for bucket in buckets:
for key in bucket.list():
print('%s' % key)