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 | |
LOGFILE=/data/logs/dps-seedbox1-rsync/$(date "+%Y-%m").log | |
EXCLUDES_COMMON="--exclude lost+found --exclude .ssh --exclude .bash_history" | |
EXCLUDES_MORE="--exclude other --exclude BASE --exclude applications" | |
# Append a header first, so we know when this script was run. | |
date "+%n%n=====%nSyncing DriverPacks to seedbox1 at %Y-%m-%d %H:%M:%S" > $LOGFILE | |
# Sync the DriverPacks themselves to the seedbox' 'data' folder. However, we |
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
function handler($errno, $errstr, $errfile, $errline) { | |
throw new Exception($errstr, $errno); | |
} | |
set_error_handler('handler'); |
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
#------------------------------------------------- | |
# | |
# Project created by QtCreator 2010-11-20T18:00:03 | |
# | |
#------------------------------------------------- | |
QT += core | |
QT -= gui |
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
#include <QDateTime> | |
#include <QTime> | |
#include <QTextStream> | |
#define NUM_CALLS 1000 | |
int main(int argc, char *argv[]) { | |
QTextStream cout(stdout); | |
QTime timer; |
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
<?php | |
/** | |
* Converts a specified structure into its bencoded form. Acceptable values | |
* include: integers, strings, arrays, and assoc. arrays. | |
* Note that associative arrays are encoded into dictionaries while | |
* non-associative arrays are encoded into lists. | |
* | |
* This was copied from http://drupal.org/project/bittorrent |
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
application/x-bittorrent .torrent |
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 | |
kill -s HUP `pidof opentracker` |
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
http://tracker.driverpacks.net:6969/stats?mode=tpbs&format=ben | |
-> per torrent: hash (ben-encoded), complete, downloaded, incomplete | |
http://tracker.driverpacks.net:6969/stats?mode=tpbs&format=txt | |
-> per torrent: hash, seeders, leechers | |
http://tracker.driverpacks.net:6969/stats?mode=statedump | |
-> per torrent: hash, base (time in minutes since epoch when the torrent last had >0 peers, *60 = unix timestamp), downloaded |
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
QDateTime timeConvertor; | |
QString customDateString = "14-Nov-2010 05:27:03 +0100"; | |
QString dateTime = customDateString.left(20); | |
int timezoneOffset = customDateString.right(5).left(3).toInt(); | |
timeConvertor = QDateTime::fromString(dateTime, "dd-MMM-yyyy HH:mm:ss"); | |
// Mark this QDateTime as one with a certain offset from UTC, and set that | |
// offset. | |
timeConvertor.setTimeSpec(Qt::OffsetFromUTC); |
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
# Disable the server signature. | |
ServerSignature Off | |
# No-www. | |
RewriteEngine On | |
RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC] | |
RewriteRule ^(.*)$ http://%1/$1 [R=301,L] | |