Skip to content

Instantly share code, notes, and snippets.

View andrulik's full-sized avatar
🏠
Working from home

Andrey Moskalenko andrulik

🏠
Working from home
View GitHub Profile
======================================================
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
"Europe/Andorra",
"Asia/Dubai",
"Asia/Kabul",
"America/Antigua",
"America/Anguilla",
"Europe/Tirane",
"Asia/Yerevan",
"America/Curacao",
"Africa/Luanda",
"Antarctica/McMurdo",
#!/bin/zsh
# Copyleft 2010 paradoxxxzero All wrongs reserved
# With contribution from James Ahlborn
# https://gist.github.com/752727
# Fork of https://gist.github.com/586698 by nicoulaj / dingram / roylzuo ...
# From http://www.zsh.org/mla/users/2010/msg00692.html
# Token types styles.
# See http://zsh.sourceforge.net/Doc/Release/Zsh-Line-Editor.html#SEC135

(a gist based on the old toolmantim article on setting up remote repos)

To collaborate in a distributed development process you’ll need to push code to remotely accessible repositories.

This is somewhat of a follow-up to the previous article setting up a new rails app with git.

For the impatient

Set up the new bare repo on the server:

"""
jQuery templates use constructs like:
{{if condition}} print something{{/if}}
This, of course, completely screws up Django templates,
because Django thinks {{ and }} mean something.
Wrap {% verbatim %} and {% endverbatim %} around those
blocks of jQuery templates and this will try its best
@andrulik
andrulik / async_psycopg2.py
Created January 23, 2012 22:35 — forked from FSX/async_psycopg2.py
A module for asynchronous PostgreSQL queries in Tornado.
#!/usr/bin/env python
__author__ = 'Frank Smit <frank@61924.nl>'
__version__ = '0.1.0'
import functools
import psycopg2
from tornado.ioloop import IOLoop, PeriodicCallback
@andrulik
andrulik / get-packages.ps1
Created February 22, 2012 19:10 — forked from vansha/get-packages.ps1
Download all packages for the solution via NuGet
$scriptDir = split-path $script:MyInvocation.MyCommand.Path
$nuget = "$scriptDir\tools\NuGet.exe"
$packagesDir = "$scriptDir\src\Packages"
$packagesConfigs = get-content "$packagesDir\repositories.config" `
| select-string -pattern "<repository path=" `
| foreach { $_ -replace "\s*<repository path=""", """$packagesDir\" } `
| foreach { $_ -replace "\s*/>" }
foreach ($pathToPackagesConfig in $packagesConfigs)
- simple
- public over private
- personal vanity
- internet is global
- permalinks
- one important item per page
- don't break the browser
- don't wanker in technology
- a medium is not a grande
- break convention for your users
@andrulik
andrulik / backup_db.py
Created March 12, 2012 22:10 — forked from ericflo/backup_db.py
A management command to put on a cron to keep daily backups of a postgres database (with a 1-week window)
import datetime
import subprocess
from django.conf import settings
from django.core.management.base import BaseCommand
from boto.s3.connection import S3Connection
from boto.s3.key import Key
class Command(BaseCommand):
"""
jQuery templates use constructs like:
{{if condition}} print something{{/if}}
This, of course, completely screws up Django templates,
because Django thinks {{ and }} mean something.
Wrap {% verbatim %} and {% endverbatim %} around those
blocks of jQuery templates and this will try its best