This file contains 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 python | |
# Makes me mad that I had to write this. Damn you mac os x 10.5.8. | |
# I, Winston Weinert, hereby put this file in the public domain. | |
import hashlib | |
class Checksum(object): |
This file contains 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 php | |
<?php | |
// Config: | |
// [minecraft_users] | |
// env.host awesomeserver.com | |
// env.port 25566 | |
error_reporting(E_ERROR | E_PARSE); | |
$host = getenv('host'); |
This file contains 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 | |
now() { | |
date '+%F %T' | |
} | |
Tarsnap='/usr/local/bin/tarsnap' | |
Hostname="$(hostname -s)" | |
BackupTarget="$2" | |
JobName="$Hostname-$1" | |
BackupDate="$(date +%F)" | |
BackupName="$JobName-$BackupDate" |
This file contains 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 python | |
import collections | |
import os | |
def make_email_dict(email): | |
"""Make an email dictionary. | |
This file contains 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 python | |
# -*- coding: utf-8 -*- | |
# MCSuperServer - Starts and stops the minecraft server to reduce memory and cpu usage | |
# Copyright (C) 2011, 2012 Paul Andreassen | |
# paul@andreassen.com.au | |
# This program is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation, either version 3 of the License, or |
This file contains 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 python | |
# | |
# Written by Winston Weinert (winston@ml1.net) on 28-March-2014 | |
# This file is in the public domain. | |
# | |
try: | |
xrange | |
except NameError: |
This file contains 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 python | |
from __future__ import print_function | |
import os | |
import requests | |
from bs4 import BeautifulSoup | |
def download_url(url, destination=None): | |
if destination is None: | |
cwd = os.getcwd() |
This file contains 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
echo '127.0.0.1 alexcrichton.com' | sudo tee -a /private/etc/hosts | |
jekyll build --watch | |
mkdir ~/tmproot | |
ln -s ~/Repositories/hermes-pages/_site ~/tmproot/hermes | |
sudo webfsd -r ~/tmproot -F -L - -p 80 -f index.html |
This file contains 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 transmissionrpc | |
import guessit | |
class TorrentBumper(object): | |
def __init__(self, host='localhost', port=9091): | |
self.client = transmissionrpc.Client(host, port=port) | |
@property |
This file contains 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
<?php | |
function getDirectoryList ($directory) { | |
$results = array(); | |
$handler = opendir($directory); | |
while ($file = readdir($handler)) { | |
if ($file != "." && $file != "..") { | |
$results[] = $file; | |
} | |
} | |
closedir($handler); |
OlderNewer