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
# | |
# httpd configuration settings for use with mailman. | |
# | |
ScriptAlias /mailman/ /usr/lib/mailman/cgi-bin/ | |
ScriptAlias /admin /usr/lib/mailman/cgi-bin/admin | |
ScriptAlias /admindb /usr/lib/mailman/cgi-bin/admindb | |
ScriptAlias /confirm /usr/lib/mailman/cgi-bin/confirm | |
ScriptAlias /create /usr/lib/mailman/cgi-bin/create | |
ScriptAlias /edithtml /usr/lib/mailman/cgi-bin/edithtml | |
ScriptAlias /listinfo /usr/lib/mailman/cgi-bin/listinfo |
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 csv | |
import os | |
import sys | |
numberOfDigits = 2 | |
# From: http://stackoverflow.com/a/3682332 | |
def int_wrapper(reader): | |
for v in reader: | |
yield map(int, v) |
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
# Makes use of the "Most Efficient Algorithm" posted here: | |
# http://homepages.ed.ac.uk/jkellehe/partitions.php | |
import csv | |
def partitions(n): | |
a = [0 for i in range(n + 1)] | |
k = 1 | |
y = n - 1 | |
while k != 0: |
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
""" | |
The portfolio rebalancing bot will buy and sell to maintain a | |
constant asset allocation ratio of exactly 20/80 = fiat/BTC | |
""" | |
import strategy | |
import os | |
import threading | |
import weakref | |
import inspect |
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
""" | |
The portfolio rebalancing bot will buy and sell to maintain a | |
constant asset allocation ratio of exactly 50/50 = fiat/BTC | |
""" | |
import strategy | |
import os | |
import threading | |
import weakref | |
import inspect |
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 | |
###################################################################################### | |
# The location of your Bittorent Sync log | |
LOG_LOCATION="/home/user/.btsync/btsync/sync.log" | |
# The list of known IPs you do not require an alert about | |
KNOWN_IPS="192.168.1|69.147.76.15|216.239.51.9" | |
# The icon for your alert | |
# I found a great little image here: | |
# http://i1-win.softpedia-static.com/screenshots/icon-60/BitTorrent-Sync.png | |
ALERT_IMAGE="/home/user/bin/BitTorrent-Sync.png" |
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 | |
if test $# -lt 2 | |
then | |
echo "Usage: start_on_desktop <desktop> <command> [<command args>...]" 1>&2 | |
exit 2 | |
fi | |
desktop=$(($1-1)) # Dave: Let the user specify the Desktop starting at 1, not 0 | |
if [ "$2" == "subl" ] # Dave: Helpful tip for running Sublime-Text |
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/bash | |
# Inspired by: | |
# http://nialldonegan.me/2007/03/10/converting-microsoft-access-mdb-into-csv-or-mysql-in-linux/ | |
# http://cltb.ojuba.org/en/articles/mdb2sqlite.html | |
# Dave's Modifications: | |
# Line 25: Added code to remove COMMENT and SET statements. | |
# Lines 28 to 37: Added code to handle primary keys. | |
# Line 51: Added "postgres" to mdb-export command. |
NewerOlder