Skip to content

Instantly share code, notes, and snippets.

-----BEGIN PGP MESSAGE-----
Comment: GPGTools - https://gpgtools.org
hQEMA6KWWlF7W5gvAQgAiskLrMgATb0f2Hsj+WDs0yIGL2YiYL/a5f66Lx65bNoU
twRX8OgZKrOKbAOvONxk6/j5UZJ5I1BJwWhuFs0P/kJlnKvejhD3IrJqO/lfajIN
ODdEZEYSHNu0nlBlm8FXZq2Vrzlp7i72QpUDcCGK+/9T65GAKdOFIu2cCkwJmYTn
e79TtFKl58U1M37AfyVCoQmdTcdozAk80EbTFnzz31cozcfP2FmvCO2s3eCuEFJs
VZqstEB2UiA/cOBx3eW4F+oLFe7g5DEOkYqGbhWUH1mpOcauc3EeYXIlaA4rEwGY
sTDz5TJSI6M3sDQkraIN+4uwxRGLggivKwkUc61RWtKoAQ2KwfWUSaHwzKdJo0eT
tBkXpEg108edXjpTpMm85RN3wQQc4WFrrBg9C8Bazmpi/AFGQM7a3HhAtjx8+ywN
@codemonkey2841
codemonkey2841 / keybase.md
Last active August 29, 2015 14:17
keybase.md

Keybase proof

I hereby claim:

  • I am codemonkey2841 on github.
  • I am adrianhannah (https://keybase.io/adrianhannah) on keybase.
  • I have a public key whose fingerprint is 698A B8F1 49C9 DD75 49D1 376A 7442 C2AC 4029 3EED

To claim this, I am signing this object:

@codemonkey2841
codemonkey2841 / pscan.c
Created December 16, 2014 04:27
A parallelized ping scanner
/********************************************************************/
/* pscan.c -- Parallelized ping scanner */
/* */
/* (c) 1997 David Simmons, simmons@simmons.starkville.ms.us */
/* */
/* compile with: cc -o pscan pscan.c */
/* */
/* This program has only been tested under Linux. */
/* */
/********************************************************************/
@codemonkey2841
codemonkey2841 / sol.pl
Created December 16, 2014 04:25
An implementation of Bruce Schneier's solitaire crypto algorithm
#!/usr/bin/perl -s
## Solitaire cryptosystem: verbose version
## Ian Goldberg <ian@cypherpunks.ca>, 19980817
## Make sure we have at least the key phrase argument
die "Usage: $0 [-d] 'key phrase' [infile ...]\n" unless $#ARGV >= 0;
## Set the multiplication factor to -1 if "-d" was specified as an option
## (decrypt), or to 1 if not. This factor will be multiplied by the output
@codemonkey2841
codemonkey2841 / hpsetdisp
Created December 16, 2014 04:21
Change the LCD display on HP printers
#!/usr/bin/perl
use strict;
use warnings;
unless (@ARGV) { print "usage: $0 <ip address> \"<RDYMSG>\"\n" ; exit }
if ($ARGV[3]) { print "Did you forget the quotes around your clever message?\n" }
my $peeraddr = $ARGV[0];
my $rdymsg = $ARGV[1];
@codemonkey2841
codemonkey2841 / snow.sh
Created December 16, 2014 04:18
Make your terminal snow!
#!/bin/bash
LINES=$(tput lines)
COLUMNS=$(tput cols)
declare -A snowflakes
declare -A lastflakes
clear
@codemonkey2841
codemonkey2841 / auto-ve
Last active August 29, 2015 14:01
Auto workon/deactivate a python virtualenv
function has_virtualenv() {
if [[ $PWD == $PROJECT_HOME* ]]; then
PRJCT_NAME=$(echo ${PWD//$PROJECT_HOME/} | cut -f 2 -d /)
if [ -n "$PRJCT_NAME" ]; then
if [ -e $WORKON_HOME/$PRJCT_NAME ]; then
if [ -z "$VIRTUAL_ENV" ]; then
workon $PRJCT_NAME
fi
return
fi