Skip to content

Instantly share code, notes, and snippets.

View jezdez's full-sized avatar
🚴
💨

Jannis Leidel jezdez

🚴
💨
View GitHub Profile
@paulirish
paulirish / gist:3098860
Created July 12, 2012 15:26
Open Conference Expectations

Open Conference Expectations

This document lays out some baseline expectations between conference speakers and conference presenters. The general goal is to maximize the value the conference provides to its attendees and community and to let speakers know what they might reasonably expect from a conference.

We believe that all speakers should reasonably expect these things, not just speakers who are known to draw large crowds, because no one is a rockstar but more people should have the chance to be one. We believe that conferences are better -- and, dare we say, more diverse -- when the people speaking are not just the people who can afford to get themselves there, either because their company paid or they foot the bill themselves. Basically, this isn't a rock show rider, it's some ideas that should help get the voices of lesser known folks heard.

These expectations should serve as a starting point for discussion between speaker and organizer. They are not a list of demands; they are a list of rea

@dholth
dholth / wheeldemo.sh
Created July 2, 2012 13:09
Python bdist_wheel (binary package format) demo
#!/bin/sh
# bdist_wheel demo
# Create environment
virtualenv /tmp/wheeldemo
cd /tmp/wheeldemo
# Install wheel and patched pip, distribute
bin/pip install -e hg+https://bitbucket.org/dholth/wheel#egg=wheel -e hg+https://bitbucket.org/dholth/distribute#egg=distribute -e git+https://github.com/dholth/pip.git#egg=pip
@aaugustin
aaugustin / gist:3012318
Created June 28, 2012 16:29
Quick'n'dirty faster test runner for Django (not tested)
from optparse import make_option
from django.test.simple import DjangoTestSuiteRunner
def fake_create_test_db(self, verbosity=1, autoclobber=False):
"""Simplified version of BaseDatabaseCreation.create_test_db."""
test_database_name = self._get_test_db_name()
if verbosity >= 1:
@zacharyvoase
zacharyvoase / README.md
Created June 14, 2012 19:05
hstore-based localized fields in Django

This could be the basis of a localized field implementation using hstore.

It mostly uses django-hstore, but then some simple JS in the admin replaces the default textarea with a richer key/value-oriented widget. The textarea is hidden, and changes in the keys and values of the form are just JSON-serialized back into the textarea—so it works with django-hstore as it is currently implemented, allows for easier programmatic access + manipulation, and doesn't require a lot of hacking.

The main change, code-wise, is that the hstore textareas need to be given an HTML class of 'hstore'. This requires more work than I think should be necessary—you need to wire the model field up to a form field, and the form field up to a widget, which replaces the class.

import sublime, sublime_plugin
import string
import textwrap
import re
import comment
def previous_line(view, sr):
"""sr should be a Region covering the entire hard line"""
if sr.begin() == 0:
return None
@utstikkar
utstikkar / otsbpython.md
Created June 1, 2012 09:00
Open Tech School Berlin Python workshops

We got inspired by the RailsGirls workshops and plan to organise similar workshops in Berlin for women and all sorts of beginners but for Python this time. We need you Python enthusiasts to help us with the coaching!

So if you think you can help coaching Python put your name down here (by forking this gist and adding yourself or leaving your contact details in a comment). No need to be an expert, no matter how much you know about Python programming your knowledge and experience will be useful to a beginner!

Note: if you are also into (or more into) JS then sign up as a JS coach here: https://gist.github.com/2850467

@issackelly
issackelly / pleaseread.markdown
Created May 27, 2012 23:44
What you can do about the Tastypie perms branch

Hey.

I know you'd like the perms branch merged into master. Here's what would be helpful:

  • Try it. Work with it in its current state and document any trouble you have. If there is a bug, the best thing you can do is write a test for it. Beyond that, writing a test and then a patch is great.
  • Use other methods. There's nothing in the perms branch that is groundbreaking, and you can apply permissions at several different spots already. Tastypie was designed to be extended, so you should be able to make the changes you need in your code. You should be able to get your work done without it.
  • Fork it, use something else, write your own.

What not to do:

@mabroor
mabroor / Procfile
Created May 25, 2012 03:19 — forked from jacobian/Procfile
Hosting Private password protected Sphinx Docs
web: gunicorn -w4 -b0.0.0.0:$PORT app:app
@idan
idan / oauthlib_twitter_example.py
Created May 2, 2012 22:50
Requests + OAuth, sample usage
import requests
from requests.auth import OAuth1
url = u'https://api.twitter.com/1/account/settings.json'
client_key = u'...'
client_secret = u'...'
resource_owner_key = u'...'
resource_owner_secret = u'...'
@codysoyland
codysoyland / gist:2505907
Created April 27, 2012 04:45
stupid gevent memcache server
from gevent.server import StreamServer
#import gevent
import time
class ClientDisconnected(Exception):
pass
class Handler(object):
def __init__(self, cache, socket, address):
self.cache = cache