Skip to content

Instantly share code, notes, and snippets.

View tomwhipple's full-sized avatar

Tom Whipple tomwhipple

View GitHub Profile
@tomwhipple
tomwhipple / makefavicon.sh
Last active December 8, 2022 15:52
Create favicon from png
# assumes imagemagick is present
convert logo.png -alpha on -resize 192x192 -define icon:auto-resize="64,32,24,16" -background none favicon.ico
@tomwhipple
tomwhipple / paypal_verify.md
Last active July 31, 2024 00:06
Verify a PayPal immediate payment in sandbox

MSDKv2 Payment Verification

Generated 2014-07-28 09:03:10.408600

PayPal Payment (v2)

Make a single PayPal payment (checkout) with MSDKv2

Client Credentials

@tomwhipple
tomwhipple / blinky.py
Created December 2, 2012 01:09
RaspberryPi GPIO demo
#!python
#
# "Hello World!" for RaspberryPi GPIO. Assumes you've correctly connected an LED to pin 5.
#
import RPi.GPIO as gpio
import time
LED_PIN = 5
@tomwhipple
tomwhipple / dms2dec.py
Created September 2, 2012 16:25
convert DMS coordinates to decimal in Python
#!/env/python
# coding=utf8
"""
Converting Degrees, Minutes, Seconds formatted coordinate strings to decimal.
Formula:
DEC = (DEG + (MIN * 1/60) + (SEC * 1/60 * 1/60))
Assumes S/W are negative.