Skip to content

Instantly share code, notes, and snippets.

"""
This fabric file makes setting up and deploying a django application much
easier, but it does make a few assumptions. Namely that you're using Git,
Apache and mod_wsgi and your using Debian or Ubuntu. Also you should have
Django installed on your local machine and SSH installed on both the local
machine and any servers you want to deploy to.
_note that I've used the name project_name throughout this example. Replace
this with whatever your project is called._
@dnordberg
dnordberg / fabfile.py
Created October 6, 2009 15:46 — forked from fiee/fabfile.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
fabfile for Django
------------------
see http://morethanseven.net/2009/07/27/fabric-django-git-apache-mod_wsgi-virtualenv-and-p/
modified for fabric 0.9/1.0 by Hraban (fiëé visuëlle)
several additions, corrections and customizations, too
"""
Git Repo:
branches
dev
worker
production
master
dev
# you'd obviously have more settings somewhere
set :scm, :git
set :repository, "git@github.com:defunkt/github.git"
set :branch, "origin/master"
set :migrate_target, :current
set(:latest_release) { fetch(:current_path) }
set(:release_path) { fetch(:current_path) }
set(:current_release) { fetch(:current_path) }
=============================================================
Installing Multicore Solr 1.3.0 / Tomcat 6.0.X on Ubuntu 8.10
=============================================================
Install OpenJDK (comes from universe)::
aptitude install openjdk-6-jre
Download Tomcat 6.X and move it in place::
# encoding: utf-8
# Derived from Piotr Maliński's example with a few modifications to use logging and :
# http://www.rkblog.rk.edu.pl/w/p/profiling-django-object-size-and-memory-usage-pympler/
from pympler.muppy import muppy
from pympler.muppy import summary
from pympler.asizeof import asizeof
from django.conf import settings
import logging
@dnordberg
dnordberg / hack.sh
Created March 31, 2012 19:04 — forked from erikh/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
@dnordberg
dnordberg / index.html
Created July 19, 2012 11:46
A web page created at CodePen.io
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>CSS/HTML Map Rotator &middot; CodePen</title>
<!--
Copyright (c) 2012 Vladimir Sobolev, http://codepen.io/350d
Permission is hereby granted, free of charge, to any person obtaining
@dnordberg
dnordberg / index.html
Created July 19, 2012 11:47
A web page created at CodePen.io
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>CSS/HTML Map Rotator &middot; CodePen</title>
<!--
Copyright (c) 2012 Vladimir Sobolev, http://codepen.io/350d
Permission is hereby granted, free of charge, to any person obtaining
@dnordberg
dnordberg / gsdproxy.py
Created July 25, 2012 13:15
gevent simple dynamic reverse proxy
#!/usr/bin/env python
from gevent import monkey
monkey.patch_all()
import sys
import redis
import urllib2
import traceback
from cgi import escape
# -- gsdproxy