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
# Quick & Dirty... Full of bugs... Dont use for production code... You have been warned... ;-) | |
import mmap | |
import os | |
NUM_LINES=10 | |
f=open('.bash_history', 'rb') | |
filesize = os.fstat(f.fileno()).st_size |
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/bash | |
# Original by http://braindump.dk/tech/2007/10/03/smugmug-uploader/ | |
# Modified by Jesse DeFer http://www.dotd.com/smugget/ | |
# Additional modifications by Robert Krawitz | |
# Downloads SmugMug albums | |
function download_image | |
{ | |
echo "Downloading $albumid/$filename ($md5sum)" | |
if [ $LOG -eq 1 ]; then |
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
package main | |
import ( | |
"fmt" | |
"math/rand" | |
"time" | |
) | |
func Shuffle(a []int) { | |
for i := range a { |
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
# This script takes a windows CSV export of the log file from a windows server machines | |
# and looks for print jobs. | |
# It then adds them to a disctionary of dictionaries of sets. First level is the date, | |
# second is the user, third is the set of printers. | |
# Then it exports them as a CSV. | |
import re | |
import sys | |
import csv |
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 | |
## Tiny Syslog Server in Python. | |
## | |
## This is a tiny syslog server that is able to receive UDP based syslog | |
## entries on a specified port and save them to a file. | |
## That's it... it does nothing else... | |
## There are a few configuration parameters. | |
LOG_FILE = 'youlogfile.log' |