mkdir -p ~/bin ~/lib/python2.6/site-packages
Configure the environment by putting something like this in your
.bashrc
and sourcing it:export CFLAGS=-I/usr/local/pgsql/include export LDFLAGS=-L/usr/local/pgsql/lib
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
====================================================== | |
Setting up Django using Apache/mod_wsgi on Ubuntu 8.10 | |
====================================================== | |
This article will cover setting up Django using Apache/mod_wsgi on Ubuntu | |
8.10. The article is targeted at a production environment, but keep in mind | |
this is a more generalized environment. You may have different requirements, | |
but this article should at least provide the stepping stones. | |
The article will use distribution packages where nesscary. As of 8.10 the |
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
"""Distributed Hash Tables (DHT).""" | |
__all__ = ['chord', 'dictionary', 'kademlia', 'koorde'] | |
__metaclass__ = type | |
class DHT: | |
pass | |
class Dictionary(DHT): |
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
// JS Module Pattern: | |
// http://j.mp/module-pattern | |
// Redefine: $, window, document, undefined. | |
var APP = (function($, window, document, undefined) { | |
// Automatically calls all functions in APP.init | |
$(document).ready(function() { | |
APP.go(); | |
}); |
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
# Creative Commons Attribution-Share Alike 3.0 United States License | |
# http://creativecommons.org/licenses/by-sa/3.0/us/ | |
# By Susan Potter <http://geek.susanpotter.net> | |
(($) -> | |
editSubmitHandler: (evt) -> | |
form: $(this) | |
data: form.serialize() | |
url: form.attr('action') | |
$.getJSON(url, data, (data, resp) -> | |
$('#notice').html(data['html']) |
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.conf import settings | |
from django.utils.translation import string_concat, ugettext_lazy | |
from django.utils.html import strip_tags | |
from haystack import indexes, site | |
from cms.models.managers import PageManager | |
from cms.models.pagemodel import Page | |
from cms.models.pluginmodel import CMSPlugin |
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
I was searching for a best way to define a javascript class, and then, I found this: | |
http://www.phpied.com/3-ways-to-define-a-javascript-class/ | |
So, it describes three ways: | |
1. using a function | |
2. using JSON | |
3. singleton (combination of 1. and 2.) | |
I couldn't find any article which describes what is the best way, in matter of compression, so I decided to test it by myself. | |
So I made three versions of my navigation system (I already had it in 2. way before I read that article), and I compressed them using google closure compiler, and these are result: |
OlderNewer