Skip to content

Instantly share code, notes, and snippets.

View BHSPitMonkey's full-sized avatar
👨‍💻
Hacking the planet

Stephen Eisenhauer BHSPitMonkey

👨‍💻
Hacking the planet
View GitHub Profile
# DropShot
# Takes a screenshot of a selection and posts to Dropbox
# Combine with GNOME DO or a panel shortcut for maximum win
PUBLICPATH=~/Dropbox/Public/
SUBDIR=DropShot/
SUBDIRPATH=$PUBLICPATH$SUBDIR
FILENAME=`date +"%Y-%m-%d--%H-%M-%S"`.png
# Check for dependencies (dropbox, scrot, xclip)
@BHSPitMonkey
BHSPitMonkey / generate_code39_barcode.php
Created September 8, 2010 19:32
A PHP function that generates a Code 39 type barcode in pure HTML/CSS
// Prints out a Code 39 barcode in HTML/CSS
// $string should be a Code 39-compliant string to encode.
// Any characters not in the array below will be discarded.
function print_code39_barcode($string) {
$code39 = array(
'0'=>'NnNwWnWnN', '1'=>'WnNwNnNnW',
'2'=>'NnWwNnNnW', '3'=>'WnWwNnNnN',
'4'=>'NnNwWnNnW', '5'=>'WnNwWnNnN',
'6'=>'NnWwWnNnN', '7'=>'NnNwNnWnW',
'8'=>'WnNwNnWnN', '9'=>'NnWwNnWnN',