Skip to content

Instantly share code, notes, and snippets.

View biggers's full-sized avatar

Mark Biggers biggers

View GitHub Profile
@zacharyvoase
zacharyvoase / django_pave.py
Created May 22, 2009 22:49
Run Django management commands with a Paver task.
# -*- coding: utf-8 -*-
# django_pave.py - Run Django management commands with a Paver task.
#
# It’s simple really; just run `paver manage syncdb`, or
# `paver manage runserver`, or indeed any Django management command. You can
# also define Paver tasks which load the Django settings before execution.
#
# Copyright (c) 2009 Zachary Voase <zacharyvoase@me.com>
#
# Permission is hereby granted, free of charge, to any person
@zacharyvoase
zacharyvoase / pavement.py
Created May 26, 2009 05:02
pavement.py file for Melange.
# -*- coding: utf-8 -*-
"""
Example Usage
=============
The following commands can be run from the root directory of the Mercurial
repo. To run ``paver``, however, you'll need to do ``easy_install Paver``.
Most of the following commands accept other arguments; see ``command --help``
for more information, or ``paver help`` for a list of all the valid commands.
from __future__ import with_statement # python2.5
"""
Project root holds virtual environment
"""
from fabric.api import *
import os.path
# globals
env.project_name = 'myproject'
@ingenieroariel
ingenieroariel / fabfile.py
Created November 4, 2010 02:57
Geonode Amazon EC2 fabfile
# easy_install boto fabric
# The only pre-req is having created a keypair via the amazon web interface
#
# Usage:
# fab geonode
from fabric.api import env, sudo, run, cd
import os, time, boto
import ConfigParser
@gregorynicholas
gregorynicholas / dev_appservers.yaml
Last active March 28, 2016 20:08
google appengine dev_appserver commands automated with paver.
default:
args:
url: localhost
port: 8888
address: 0.0.0.0
partition: s
flags:
- use_sqlite
- high_replication
- allow_skipped_files
@lbolla
lbolla / futures_test.py
Last active April 24, 2023 17:59
Tornado and concurrent.futures
from concurrent.futures import ThreadPoolExecutor
from functools import partial, wraps
import time
import tornado.ioloop
import tornado.web
EXECUTOR = ThreadPoolExecutor(max_workers=4)
@smoser
smoser / apt-go-fast
Last active February 13, 2017 16:17
user-data for setting up devstack
#!/bin/sh
#
# copied from https://gist.github.com/smoser/5823699
#
set -e
[ -e "/usr/bin/apt-get.distrib" ] ||
sudo dpkg-divert --local --rename --add /usr/bin/apt-get
sudo tee /usr/bin/apt-get >/dev/null <<"EOF"
@jokull
jokull / gist:5639728
Created May 23, 2013 21:51
Cache a python package from PyPI on S3
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""pycache -- cache a python package from PyPI on S3.
A simple script to collect a cache of packages locally and sync them up to an S3 bucket, using directories as namespaces so that different projects can have different dependencies.
This is just about the simplest thing that could possibly work.
"""
import warnings
warnings.filterwarnings('ignore')
@dankrause
dankrause / pagerduty.py
Last active May 30, 2023 00:43
Simple python client for the Pagerduty integration API
#!/usr/bin/env python
"""pagerduty.py
Usage:
pagerduty.py trigger [options] <description> [<incident_key>]
pagerduty.py acknowledge [options] <description> <incident_key>
pagerduty.py resolve [options] <description> <incident_key>
Options:
-c --conf=FILE A path to a config file
@biggers
biggers / linux_rescue_notes.rst
Last active November 15, 2018 02:05
Rescuing a Linux system