I hereby claim:
- I am sspencer on github.
- I am steve_spencer (https://keybase.io/steve_spencer) on keybase.
- I have a public key ASAmiGpUUaDFLwkAnpEZySbGDBM_2b1ZqbF0Iq01hBl0AQo
To claim this, I am signing this object:
// Two ways to serve transparent GIF | |
var buf = new Buffer([ | |
0x47, 0x49, 0x46, 0x38, 0x39, 0x61, 0x01, 0x00, 0x01, 0x00, | |
0x80, 0x00, 0x00, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x2c, | |
0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x02, | |
0x02, 0x44, 0x01, 0x00, 0x3b]); | |
res.send(buf, { 'Content-Type': 'image/gif' }, 200); |
-- | |
-- Mysql Functions and Idea from http://www.xarg.org/2009/12/people-near-you-with-mysql/ | |
-- Stored procedures from Steve. | |
-- Not using `point`, could leave out field from location table. | |
-- | |
CREATE TABLE IF NOT EXISTS `location` ( | |
`vendor_id` INT unsigned NOT NULL, | |
`lat` decimal(10,6) NOT NULL, | |
`lon` decimal(10,6) NOT NULL, |
I hereby claim:
To claim this, I am signing this object:
// Golang UK Conference 2016 - Mat Ryer - Idiomatic Go Tricks | |
func foo() error { | |
log.Println("----------") | |
defer log.Println("----------") | |
// ... do stuff ... | |
} |
// Golang UK Conference 2016 - Mat Ryer - Idiomatic Go Tricks | |
func StartTimer(name String) func() { | |
t := time.Now() | |
log.Println(name, "started") | |
return func() { | |
d := time.Now().Sub(t) | |
log.Println(name, "took", d) | |
} | |
} |
<option value="AL">Alabama</option> | |
<option value="AK">Alaska</option> | |
<option value="AZ">Arizona</option> | |
<option value="AR">Arkansas</option> | |
<option value="CA">California</option> | |
<option value="CO">Colorado</option> | |
<option value="CT">Connecticut</option> | |
<option value="DE">Delaware</option> | |
<option value="FL">Florida</option> | |
<option value="GA">Georgia</option> |
package command | |
import ( | |
"fmt" | |
"net" | |
"os" | |
) | |
const ( | |
message = "This process is already running in SOLO mode." |
closurejs() | |
{ | |
curl -s --data output_info=compiled_code --data-urlencode js_code@${1} http://closure-compiler.appspot.com/compile | |
} |
// Simple embedded REPL | |
var repl = require("repl"); | |
repl.start({ | |
prompt: "karma> ", | |
input: process.stdin, | |
output: process.stdout, | |
eval: function(cmd, context, filename, callback) { | |
// cmd comes thru as "(ls\n)", get back to original "ls" | |
callback("You typed: " + cmd.substring(1, cmd.length-1).trim()); |
// Register your NetworkOperation class after creating your network engine | |
// someEngine = [[SomeEngine alloc] initWithHostName:SOME_API customHeaderFields:nil]; | |
// [someEngine registerOperationSubclass:[SomeNetworkOperation class]]; | |
// ------ SomeNetworkOperation.h ------ | |
#import "MKNetworkOperation.h" | |
@interface SomeNetworkOperation : MKNetworkOperation | |
@end |