Skip to content

Instantly share code, notes, and snippets.

#!python
# This monstrosity was created to sync events from my Work calendar ical feed to a google calendar
# Google Calendar already supports ical feeds you say? Well... it would be nice if they
# updated them every once and awhile.
try:
from xml.etree import ElementTree
except ImportError:
from elementtree import ElementTree
---
layout: default
title: Posts by date
---
<h1>{{ page.title }}</h1>
{% for year in site.postsbyyear %}
{% for month in year.months %}
<h2>{{ month.name }} {{ year.number }}</h2>
<ul class="clickList">
# Based on Bruce Cooper's postsbydate.rb
# https://github.com/brucejcooper/8bitcloud.com/blob/master/_plugins/postsbydate.rb
# http://www.8bitcloud.com/2010/12/29/posts-in-tree.html
module Jekyll
class Site
# Sort posts by category and date
def postsbycategory
categories = []
self.categories.sort.each do |category_name, posts|
==> Build Environment
CC: /usr/bin/cc => /usr/bin/gcc-4.2
CXX: /usr/bin/c++ => /usr/bin/c++-4.2
LD: /usr/bin/cc => /usr/bin/gcc-4.2
CFLAGS: -O3 -march=core2 -msse4.1 -w -pipe
CXXFLAGS: -O3 -march=core2 -msse4.1 -w -pipe
MAKEFLAGS: -j2
==> Checking out http://v8cgi.googlecode.com/svn/trunk/
/usr/bin/svn up --force http://v8cgi.googlecode.com/svn/trunk/ /Users/moshen/Library/Caches/Homebrew/v8cgi--svn
#!/usr/bin/python
# This monstrosity was created to sync events from my Work calendar to my main calendar using the google data apis
try:
from xml.etree import ElementTree
except ImportError:
from elementtree import ElementTree
import gdata.calendar.service
import gdata.service
import tornado.httpclient
from urllib import urlencode
from hashlib import md5
class admobAsync():
"""
Does admob ad requests asynchronously. I don't know if this is the right way to do this, but I found it handy. Based on: http://www.djangosnippets.org/snippets/883/
Use this class as RequestHandler a mixin like so:
import tornado.httpclient
from urllib import urlencode
from hashlib import md5
def admob_ad(request, admob_params=None):
"""
Given a Tornado ``self.request`` object and dict of
admob parameters returns a Admob ad.
If no ad can be retrieved displays a one pixel