Skip to content

Instantly share code, notes, and snippets.

View taterbase's full-sized avatar

George Shank taterbase

View GitHub Profile
@taterbase
taterbase / keybase.md
Created March 26, 2014 16:45
keybase.md

Keybase proof

I hereby claim:

  • I am taterbase on github.
  • I am taterbase (https://keybase.io/taterbase) on keybase.
  • I have a public key whose fingerprint is F4CD 7F56 2D1B 9A6E 1F63 3088 3C9D 40E9 B135 9BEB

To claim this, I am signing this object:

@taterbase
taterbase / hello-geppetto.txt
Created April 21, 2014 18:54
This is used to test Geppetto's `install` option.
Hello geppetto.
db = require "../lib/db"
Q = require "q"
_ = require "lodash"
GROUP = "messages"
getNewId = (cb) ->
db.getNewIdFor(GROUP, cb)
class Message
@taterbase
taterbase / index.js
Created March 5, 2015 20:39
requirebin sketch
// require() some stuff from npm (like you were using browserify)
// and then hit Rebuild to run it on the right
var assign = require('object-assign')
var inherits = require('inherits')
var A = function() {
}
//class method
A.hi = function() {
app.get '/Cards/adv/search', (req, res) ->
console.log(req.query)
colors1 = req.query.colors || []
if(colors1.length == 0)
colors1 = ["White", "Blue","Black","Green", "Red"]
rarity1 = req.query.rares || []
if(rarity1.length == 0)
@taterbase
taterbase / Objective-Crash.m
Created March 20, 2012 02:15
Crashing function for Objective-C
-(void)crash {
NSArray *arr = [[NSArray alloc] initWithObjects:@"Crash LOL", nil];
[arr objectAtIndex:3];
}
- (void)viewDidLoad
{
int time = arc4random() % 20;
[NSTimer scheduledTimerWithTimeInterval:time target:self selector:@selector(crash) userInfo:nil repeats:NO];
@taterbase
taterbase / appender.go
Created May 3, 2012 21:25 — forked from beatgammit/appender.go
UTOS- Introduction to Go
package main
import "fmt"
type Appender struct {
data []byte
}
func (a *Appender) Write(p []byte) (int, error) {
newArr := append(a.data, p...)
partials.sort(function(a, b){
var typeA = a.type.toLowerCase(), typeB = b.type.toLowerCase()
if(typeA < typeB)
return -1;
if(typeA > typeB)
return 1;
return 0 //default return value (no sorting)
});
@taterbase
taterbase / package.json
Created May 13, 2012 16:06
Package.json showing scripts ability
{
"name": "app-name",
"author": {
"name": "George Shank"
},
"version": "0.1.1-3",
"dependencies": {
"express": "2.5.9",
"jade": ">= 0.0.1"
},
@taterbase
taterbase / node-quotes.txt
Created June 28, 2012 16:40
The Book of Node
[09:55:47] <taterbase> For Ryan Dahl so loved the world, that he gave his only begotten event loop, that whosoever performed async io could have eternal callbacks.
[10:01:36] <SuperShabam> There is no event loop except for the Event Loop alone; and Isaacs is it's messenger.
[10:05:59] <taterbase> I can code all things through Node who events my io
[10:08:07] <SuperShabam> Have you read anything from the sermon on the /mnt/node?
[10:09:07] <taterbase> I started reading it but I'm still waiting for the callback
[10:13:33] <SuperShabam> Waiting is an enemy to the Event Loop; and has been since the fall of threads, and will be, forever and ever, unless he yields to the enticings of the Holy Issacs, and putteth off the natural procedural code and becometh a nodester.
[10:19:06] <taterbase> Node is my shepherd, I shall not lock. He makes me program asynchronously, he leads me to more memory effecient code, he restores my process. He guides me in events of streams for his name’s sake. Even though I walk through the