An extremely minimal implementation of the `Finger protocol`_ using node.js.
To run (Finger uses port 79 which requires sudo):
sudo node finger_server.js
| #!/bin/sh | |
| # First, open up GitX | |
| cd ~/Code/Python/django-haystack; gitx | |
| tmux start-server | |
| tmux new-session -d -s Haystack -n git | |
| tmux new-window -tHaystack:1 -n test | |
| tmux new-window -tHaystack:2 -n solr | |
| tmux new-window -tHaystack:3 -n docs | |
| tmux new-window -tHaystack:4 -n runserver |
An extremely minimal implementation of the `Finger protocol`_ using node.js.
To run (Finger uses port 79 which requires sudo):
sudo node finger_server.js
| /* | |
| twirc.js | |
| ======== | |
| Automating Twitter messages to IRC. BSD license. | |
| Installation: | |
| ------------- | |
| * brew install node |
| server { | |
| listen 80; | |
| server_name rtfd.org *.rtfd.org; | |
| if ($host ~* (.*)\.rtfd\.org) { | |
| set $slug $1; | |
| rewrite ^(.*)$ http://$slug.readthedocs.org; | |
| } | |
| rewrite ^/(\w+)$ http://$1.readthedocs.org/; | |
| rewrite ^(.*)$ http://readthedocs.org/; |
| Suggestions from the 11 hackers at the table: | |
| * Use connection pooling (pgpool). | |
| * Don't expect reporters to get excited until you can show them something. (Find a way to appeal to reporters interests.) | |
| * Only update what's changed. (e.g. on election results: show changes, not raw numbers) | |
| * Use the AP's "dbready" format for election results. | |
| * Use CSV for everything. | |
| * Use pdb with runserver for debugging. | |
| * Beware circular imports when using Haystack. | |
| * Make the case for building news apps with government data. (Niran will provide numbers showing that people look at it.) |
| # This is the entire preseed config file used on an example Lucid system. See the preseed | |
| # documentation for more information on the options here. This will use US English by default. | |
| # | |
| # https://help.ubuntu.com/10.04/installation-guide/amd64/preseed-contents.html | |
| # | |
| # This preseed will automatically install Ubuntu 10.04 with default options. Understand what | |
| # it is doing before you use it. | |
| # | |
| # Boot Options line: | |
| # |
| import base64 | |
| import os | |
| from tastypie.fields import FileField | |
| from django.core.files.uploadedfile import SimpleUploadedFile | |
| class Base64FileField(FileField): | |
| """ | |
| A django-tastypie field for handling file-uploads through raw post data. | |
| It uses base64 for en-/decoding the contents of the file. | |
| Usage: |
| #!/usr/bin/env python | |
| """ | |
| Nagios plugin to check PostgreSQL 9 streaming replication lag. | |
| Requires psycopg2 and nagiosplugin (both installable with pip/easy_install). | |
| MIT licensed: | |
| Copyright (c) 2010 Jacob Kaplan-Moss. All rights reserved. |
| 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): |
| # install git | |
| sudo apt-get install g++ curl libssl-dev apache2-utils | |
| sudo apt-get install git-core | |
| # download the Node source, compile and install it | |
| git clone https://github.com/joyent/node.git | |
| cd node | |
| ./configure | |
| make | |
| sudo make install | |
| # install the Node package manager for later use |