Skip to content

Instantly share code, notes, and snippets.

View gavinblair's full-sized avatar

Gavin Blair gavinblair

View GitHub Profile
@gavinblair
gavinblair / errors.php
Created May 4, 2012 20:05
Error Reporting: I'm always trying to remember how to do this
<?php
error_reporting(E_ALL);
ini_set('display_errors', TRUE);
ini_set('display_startup_errors', TRUE);
@gavinblair
gavinblair / gist:2955973
Created June 19, 2012 19:12
Google Spreadsheets - today?
=IF(OR(NETWORKDAYS(A3,NOW())=1, NETWORKDAYS(A3,NOW())=0),"YES","NO")
Chew your food, at least 25 times per bite.
javascript:(function(){$('*').css({ "font-family": "Comic Sans MS", "color": "yellow", "text-transform": "uppercase" });})();
@gavinblair
gavinblair / .htaccess
Created July 20, 2012 18:29
don't cache these files
# we're using appcache to cache our stuff.
<filesMatch "\.(html|htm|js|css|jpg|png|appcache)$">
Header set Cache-Control "no-cache"
</filesMatch>
@gavinblair
gavinblair / .htaccess
Created July 20, 2012 18:34
force download of pdf files
<FilesMatch "\.(pdf)$">
Header set Content-Type application/octet-stream
Header set Content-Disposition "attachment"
</filesMatch>
@gavinblair
gavinblair / formulas.txt
Created August 3, 2012 14:57
What time today will all these bugs be done?
=if(roundup(HOUR(GoogleClock())+1+G1)>24; "Another Day";if(roundup(HOUR(GoogleClock())+1+G1)>12; concatenate(roundup(HOUR(GoogleClock())+1+G1)-12;"pm"); concatenate(roundup(HOUR(GoogleClock())+1+G1);"am")))
G1
=sum(D:D)
D column contains the Estimated Time Remaining for each bug
@gavinblair
gavinblair / hello.go
Created August 23, 2012 11:10
Days until explode($pizza)->event[2]!
package explodepizza
import(
"fmt"
"net/http"
"time"
)
func init() {
http.HandleFunc("/", handler)
@gavinblair
gavinblair / Main.lua
Created August 24, 2012 18:13
@berdandy's Particle Fountain
function setup()
displayMode(STANDARD)
availableScenes = { Scene1() }
currentScene = availableScenes[1]
iparameter("SceneSelect",1,#availableScenes,1)
parameter("Size",50,500,150)
@gavinblair
gavinblair / preload.js
Created October 2, 2012 14:06
Preload image function
function preload(source) {
var i = new Image();
i.src = source;
}