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
(add-to-list 'load-path "~/.emacs.d/") | |
(add-to-list 'load-path "~/.emacs.d/contrib/") | |
(setenv "PATH" | |
(concat (getenv "PATH") | |
":/usr/local/bin:/usr/local/texlive/2010/bin/universal-darwin/")) | |
;; https://github.com/marktran/color-theme-chocolate-rain | |
(progn | |
(require 'color-theme) |
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 config | |
server { | |
server_name transparentnevada.com www.transparentnevada.com; | |
client_max_body_size 30m; | |
location /favicon.ico { | |
alias /srv/django-media/transparentnevada-production/images/favicon.ico; | |
} | |
location /static/ { |
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
Download memcached source | |
./configure --enable-sasl --enable-sasl-pwdb | |
make | |
echo "user:password" > memcached-sasl-pwdb | |
export MEMCACHED_SASL_PWDB=memcached-sasl-pwdb | |
./memcached -S -vv | |
Don't need anything with sasl, saslpasswd2, or memcached.conf |
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
# transmission.py | |
class Transmission(object): | |
# ... snip ... | |
def _make_request(self, method, **kwargs): | |
body = anyjson.serialize(self._format_request_body(method, **kwargs)) | |
response = requests.post(self.url, data=body, headers=self.headers, auth=self.auth) | |
if response.status_code == CSRF_ERROR_CODE: | |
self.headers[CSRF_HEADER] = response.headers[CSRF_HEADER] | |
return self._make_request(method, **kwargs) | |
return response |
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 sunlight, tablib | |
lawmakers = sunlight.congress.legislators() | |
names_and_twitter = tablib.Dataset(headers=('name', 'twitter')) | |
for lawmaker in lawmakers: | |
name = lawmaker['firstname'] + " " + lawmaker['lastname'] | |
twitter = lawmaker['twitter_id'] | |
names_and_twitter.append([name, twitter]) |
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
<script type="text/javascript"> | |
var _gaq = _gaq || []; | |
_gaq.push(['_setAccount', 'UA-6492871-3']); | |
_gaq.push(['_trackPageview']); | |
(function() { | |
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; | |
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; | |
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); |
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 | |
""" | |
Display a UTC timestamp lookup table to quickly translate UTC | |
timestamps to your local timezone. | |
Displays the value of the local timestamp in both 12 and 24-hour | |
formats along with an asterisk next to the current hour. | |
arrow <http://crsmithdev.com/arrow/> must be present to run. |
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 0d0691611f35f955c7211bd86696ddc6005c62a0 Mon Sep 17 00:00:00 2001 | |
From: Eric Davis <eric@davising.com> | |
Date: Sat, 4 Oct 2014 10:47:14 -0700 | |
Subject: [PATCH] Add 'edavis/emacs' as an unofficial tap | |
--- | |
Interesting-Taps-&-Branches.md | 2 ++ | |
1 file changed, 2 insertions(+) | |
diff --git a/Interesting-Taps-&-Branches.md b/Interesting-Taps-&-Branches.md |
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 requests | |
from collections import defaultdict | |
r = requests.get('http://api.census.gov/data/2013/acs5/variables.json') | |
acs = r.json()['variables'] | |
c = defaultdict(list) | |
for key, value in acs.iteritems(): |
OlderNewer