- GitHub.com provides great public repository hosting.
- vanilla git over ssh works for simple project structures.
- gitosis works well where you'd like to use ssh pubkeys without shell access.
- gitolite works well where you'd like gitosis to have finer access control.
This file contains hidden or 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
[supervisord] | |
nodaemon=true | |
[supervisorctl] | |
serverurl=unix://supervisor.sock | |
[unix_http_server] | |
file=supervisor.sock | |
[rpcinterface:supervisor] |
This file contains hidden or 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
#! /bin/sh | |
# Save as /etc/init.d/fancontrol | |
# update-rc.d fancontrol defaults 90 10 | |
# | |
# Based on /etc/init.d/skeleton | |
# Tested on a Supermicro 1U box running Ubuntu 10.04 x86_64. | |
### BEGIN INIT INFO | |
# Provides: fancontrol | |
# Required-Start: | |
# Required-Stop: |
This file contains hidden or 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
#!/usr/bin/env ruby | |
dry_run = ARGV.delete('--dry-run') | |
force = ARGV.delete('--force') | |
if ARGV.empty? | |
puts <<-USAGE | |
minify, swiftly concat and minify JavaScript files from the command line | |
Pass a single argument to create a .min.js version: |
This page is now deprecated! You can get the latest information about First Wednesdays from our new Meetup group: http://bit.ly/cville-fw
This file contains hidden or 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
import code | |
def get_module_docstring(filepath): | |
"Get module-level docstring of Python module at filepath, e.g. 'path/to/file.py'." | |
co = compile(open(filepath).read(), filepath, 'exec') | |
if co.co_consts and isinstance(co.co_consts[0], basestring): | |
docstring = co.co_consts[0] | |
else: | |
docstring = None | |
return docstring |
This file contains hidden or 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
import cookielib | |
import urllib | |
import urllib2 | |
class Client(object): | |
def __init__(self): | |
self.cookie_jar = cookielib.CookieJar() | |
self.opener = urllib2.build_opener( | |
urllib2.HTTPCookieProcessor(self.cookie_jar)) |
This file contains hidden or 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
"Plot a PNG using matplotlib in a web request, using Flask." | |
# Install dependencies, preferably in a virtualenv: | |
# | |
# pip install flask matplotlib | |
# | |
# Run the development server: | |
# | |
# python app.py | |
# |
This file contains hidden or 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
# git rebase -i head~n (where n is the number of commits from head you want) | |
# You will see something like this: | |
pick 907cdd8 Added new files to project | |
pick 8be0e96 Recent profile view pull to reload | |
# Rebase a1cd6ef..8be0e96 onto a1cd6ef | |
# | |
# Commands: |
This file contains hidden or 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 celery import abstract | |
from celery import current_app | |
from kombu import Exchange, Queue | |
from kombu.mixins import ConsumerMixin | |
# need to subclass the result backend so that it uses a topic exchange | |
# instead of direct, and send the results for tasks using a routing_key | |
# of the format: |
OlderNewer