Skip to content

Instantly share code, notes, and snippets.

[default]
aws_access_key_id=AKIATTGGMOWUTOKBBNAE
aws_secret_access_key=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
@opie4624
opie4624 / commandline.py
Last active February 7, 2024 01:39
Base Python Command Line template
#!/usr/bin/env python
#
# import modules used here -- sys is a very standard one
import sys, argparse, logging
# Gather our code in a main() function
def main(args, loglevel):
logging.basicConfig(format="%(levelname)s: %(message)s", level=loglevel)
@opie4624
opie4624 / gist:59645
Created February 6, 2009 22:04
A nice non-compete agreement
\documentclass[11pt]{article}
\usepackage{geometry} % See geometry.pdf to learn the layout options. There are lots.
\geometry{letterpaper} % ... or a4paper or a5paper or ...
%\geometry{landscape} % Activate for for rotated page geometry
\usepackage[parfill]{parskip} % Activate to begin paragraphs with an empty line rather than an indent
\usepackage{graphicx}
\usepackage{amssymb}
\usepackage{epstopdf}
\DeclareGraphicsRule{.tif}{png}{.png}{`convert #1 `dirname #1`/`basename #1 .tif`.png}
%\nopagenumbers
@opie4624
opie4624 / annex-cost.sh
Created December 30, 2012 01:12
Calculate git-annex cost based on ping times for remote hosts.
#!/bin/sh
#
PING="/sbin/ping"
PACKET_SIZE=64
PACKET_COUNT=10
PING_INTERVAL=1
TIMEOUT=2
BASE_COST=200
@opie4624
opie4624 / fix_nmap_xml_output.sh
Created October 6, 2010 15:45
Fixes XML files resulting from a resumed NMAP scan
#!/bin/bash
# If you resume an NMAP scan while outputting to XML the file
# becomes malformed. This script will take that file and split
# it into multiple .xml files, one for each run.
#
# Files without the .xml extension didn't lint and couldn't be fixed.
#
# It will try to lint the file twice, and add </nmaprun> if needed.
# If that doesn't work, pay attention to the xmllint errors and
@opie4624
opie4624 / Solution.txt
Created January 10, 2009 05:15
Puzzles for Hackers
>>> from xorencdec import xorencdec
>>> xorencdec('creature_creature_creature',']VTYJQC]aGC]_PDJ[{RJ[EEMLA')
'>$18>$18>$18>$18>$18>$18>$'
>>> xorencdec('Smith','>$18')
'mIXLV'
@opie4624
opie4624 / tarsnap-install.sh
Last active December 11, 2015 00:17 — forked from mdigital/tarsnap-install.sh
Debian / Ubuntu Tarsnap installation
#!/bin/sh
# Installs tarsnap client on Debian and Ubuntu
#
# You'll need to setup an account at
# http://www.tarsnap.com
# and load it with some funds
#
# Make sure you run this as root
#
#!/bin/bash
LOG=/tmp/netlog-$1
rm -f $LOG
while ( true );
do
ping -c1 -t 1 $1 > /dev/null
if [ "$?" -gt "0" ]; then
echo `date` " I am offline" | tee $LOG
traceroute -a $1 | tee $LOG
fi
#!/bin/bash
while getopts "vdn:b:" opt; do
case $opt in
h)
echo "usage: $0 [-h] [-v] [-d] [-n skip] [-b parallel]"
exit
;;
v)
14:22:20 <jk0> damacus: if you need something to read, check out 'Many Lives, Many Masters'. awesome book
14:22:30 <jk0> I read it in 2-3 hours one day when I was supposed to be working
14:22:32 <jk0> couldn't put it down
14:22:38 <psych0sys> also Many Masters, Few Baiters by the same author
14:22:41 <psych0sys> its a graphic novel