-
History of Realtime - @metajack
-
IO Insights - @guille
https://speakerdeck.com/rauchg/io-insights -
Making DISQUS Realtime - @NorthIsUp
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
<?xml version="1.0" encoding="UTF-8" ?> | |
<rss version="2.0"> | |
<channel> | |
<title>RSS Example</title> | |
<description>This is an example of an RSS feed</description> | |
<link>http://www.domain.com/link.htm</link> | |
<lastBuildDate>Mon, 28 Aug 2006 11:12:55 -0400 </lastBuildDate> | |
<pubDate>Tue, 29 Aug 2006 09:00:00 -0400</pubDate> |
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 datetime | |
import decimal | |
import logging | |
from StringIO import StringIO | |
from lxml import html | |
import twill | |
from twill import commands as twl | |
logging.basicConfig(level=logging.WARNING) |
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 boto.iam import IAMConnection | |
iam = IAMConnection(aws_key, aws_secret) | |
iam.create_user('user') | |
iam.create_group('group') | |
iam.put_group_policy('group', 'EC2', '{"Statement":[{"Effect":"Allow","Action":"ec2:*","Resource":"*"}]}') | |
iam.add_user_to_group('group', 'user') | |
iam.create_access_key('user') |
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 os | |
from fabric.api import * | |
env.local_root=os.path.dirname(__file__) | |
def deploy_github(): | |
with lcd(env.local_root): | |
local('git checkout master') | |
commit = local('git log -1|grep commit', capture=True) |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"> | |
<channel> | |
<title>Inhabi</title> | |
<link></link> | |
<description>Recent items</description> | |
<language>en-us</language> | |
<ttl>40</ttl> | |
<item> | |
<title>This is a title</title> |
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 django.utils.html import escape | |
from django.contrib.comments.models import Comment | |
from django.utils.encoding import smart_str | |
post = u'' | |
for i in Comment.objects.order_by('submit_date'): | |
if not i.content_object: | |
continue | |
post += u""" |
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
diff --git a/haystack/query.py b/haystack/query.py | |
index 8caa279..988f7f8 100644 | |
--- a/haystack/query.py | |
+++ b/haystack/query.py | |
@@ -2,6 +2,7 @@ import operator | |
import re | |
import warnings | |
from django.conf import settings | |
+from django.utils.encoding import force_unicode | |
from haystack.backends import SQ |
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
require 'formula' | |
class Boost < Formula | |
homepage 'http://www.boost.org' | |
url 'http://downloads.sourceforge.net/project/boost/boost/1.48.0/boost_1_48_0.tar.bz2' | |
md5 'd1e9a7a7f532bb031a3c175d86688d95' | |
head 'http://svn.boost.org/svn/boost/trunk', :using => :svn | |
# Bottle built on 10.7.2 using XCode 4.2 | |
bottle 'https://downloads.sourceforge.net/project/machomebrew/Bottles/boost-1.48.0-bottle.tar.gz' |
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 time | |
import json | |
import urllib2 | |
import subprocess | |
def check_results(): | |
page = urllib2.urlopen('http://elections.nytimes.com/2012/results/president/big-board.json') | |
data = json.loads(page.read()) |
OlderNewer