Skip to content

Instantly share code, notes, and snippets.

View ionelmc's full-sized avatar
🙃
wat

Ionel Cristian Mărieș ionelmc

🙃
wat
View GitHub Profile
@datagrok
datagrok / gist:2199506
Last active December 16, 2024 16:14
Virtualenv's `bin/activate` is Doing It Wrong
@sharoonthomas
sharoonthomas / cached_property.py
Created January 25, 2012 01:02
Python cached property implementation
class cached_property(object):
"""A decorator that converts a function into a lazy property. The
function wrapped is called the first time to retrieve the result
and then that calculated result is used the next time you access
the value::
class Foo(object):
@cached_property
def foo(self):
@audaxion
audaxion / Japanese style
Created September 29, 2011 23:50 — forked from endolith/Has weird right-to-left characters.txt
Unicode smileys emoticons
⨀_⨀
⨂_⨂
(/◔ ◡ ◔)/
°ﺑ°
(¬_¬)
(´・ω・`)
(ʘ_ʘ)
(ʘ‿ʘ)
(๏̯͡๏ )
(◕_◕)
@mbrochh
mbrochh / models.py
Created September 28, 2011 12:14
Attach the django-shop cart to a User that started shopping anonymously
# add this soewhere where it gets loaded very early, i.e.
# your shop's models.py
from django.contrib.auth import login
from django.contrib.auth.signals import user_logged_in
from django.dispatch import receiver
from registration.signals import user_activated
from shop.models.defaults.cart import Cart
@amcgregor
amcgregor / app-server.textile
Created April 10, 2011 02:40
An overview of some ideas for a Python application server.

Application Management Server

Web-based interface (w/command-line tools) for managing:

  1. Application server configuration.
    1. SSH keys, etc.
  2. Application installation.
    1. Drop a .zip (or .egg, more on this below) into a folder.
    2. Upload the same via web interface.
    3. Enter the URL of a SCM system for checkout and deployment.
@jezdez
jezdez / pip.conf
Created March 10, 2010 14:57
My ~/.pip/pip.conf. More information here: http://pip.openplans.org/configuration.html
[global]
default-timeout = 60
respect-virtualenv = true
download-cache = ~/.pip/cache
log-file = ~/.pip/pip.log
build = ~/.pip/build
[install]
use-mirrors = true