Skip to content

Instantly share code, notes, and snippets.

View mentat's full-sized avatar

Jesse Lovelace mentat

  • Austin, TX
View GitHub Profile
@k0001
k0001 / microformats.py
Created May 4, 2011 11:48 — forked from scoffey/microformats.py
Python microformats parser that supports hCard, hCalendar, hResume and rel-tag and provides an extensible model for other microformats.
# -*- coding: utf-8 -*-
#!/usr/bin/env python
"""
Model for microformat properties and parsers. A microformat parser can
parse an HTML element into a dictionary of properties, whose keys are
strings and whose values are strings or other dictionary of properties.
As an example, the main program of this script parses an hResume from
given URL.
@nono
nono / Makefile
Created June 22, 2011 09:48
Long polling with golang... only 282 clients?
include $(GOROOT)/src/Make.inc
TARG=long_polling
GOFILES=long_polling.go
include $(GOROOT)/src/Make.cmd
@phpdude
phpdude / nginx.conf
Last active October 6, 2024 19:22
Nginx image filter + caching of results.
location /resize {
alias /tmp/nginx/resize;
set $width 150;
set $height 100;
set $dimens "";
if ($uri ~* "^/resize_(\d+)x(\d+)/(.*)" ) {
set $width $1;
set $height $2;
set $image_path $3;
@hetsch
hetsch / multilingual.py
Created January 11, 2012 09:51
Multilingual model for appengine ndb
import functools
import unittest2
import os
from google.appengine.api import datastore_errors
from google.appengine.ext.ndb import model
from google.appengine.ext.ndb import tasklets
from google.appengine.ext import testbed
#---------------------------------------
@craigmj
craigmj / gomaps.go
Created June 13, 2013 01:07
Performance testing of goroutine vs sync map implementation in Go.
package main
import (
"fmt"
"math/rand"
"runtime"
"strconv"
"sync"
"time"
)
@martinrusev
martinrusev / cron_supervisord.ini
Last active June 1, 2024 03:27
Cron supervisord
[supervisord]
nodaemon=true
loglevel=debug
[program:amon]
command=gunicorn -c gunicorn.conf.py wsgi
directory=/amon
autostart=true
autorestart=true
redirect_stderr=true