Skip to content

Instantly share code, notes, and snippets.

View morningtoast's full-sized avatar

Brian Vaughn morningtoast

View GitHub Profile
@morningtoast
morningtoast / outline_sprite.p8.lua
Last active March 12, 2019 15:31 — forked from Liquidream/outline_sprite.p8.lua
Useful sprite draw function for PICO-8 (and maybe Lua in general)
--
-- draws a sprite to the screen with an outline of the specified colour
-- transc is color to use as transparent; default is black (0)
function outline_sprite(n, col_outline,transc x,y, w,h, flip_x,flip_y)
transc=transc or 0
-- reset palette to black
palt(transc,true)
for c=1,15 do
pal(c,col_outline)
/**
* Simple localStorage with Cookie Fallback
* v.1.0.0
*
* USAGE:
* ----------------------------------------
* Set New / Modify:
* store('my_key', 'some_value');
*
* Retrieve:
@morningtoast
morningtoast / php-timezone-dropdown
Last active December 21, 2015 21:39 — forked from tamaspap/gist:6281449
Time zone list for PHP
<select name="timezone">
<option value="America/New_York">(-05:00) US/Canada Eastern Time</option>
<option value="America/Chicago">(-06:00) US/Canada Central Time</option>
<option value="America/Denver">(-07:00) US/Canada Mountain Time</option>
<option value="America/Los_Angeles">(-08:00) US/Canada Pacific Time</option>
<option value="">-----</option>
<option value="Pacific/Wake">(-12:00) International Date Line West</option>
<option value="Pacific/Apia">(-11:00) Midway Island</option>
<option value="Pacific/Apia">(-11:00) Samoa</option>
<option value="Pacific/Honolulu">(-10:00) Hawaii</option>