Skip to content

Instantly share code, notes, and snippets.

View taterbase's full-sized avatar

George Shank taterbase

View GitHub Profile
@taterbase
taterbase / es.sh
Last active December 21, 2015 21:29
cd ~
sudo apt-get update
sudo apt-get install openjdk-7-jre-headless -y
### Check http://www.elasticsearch.org/download/ for latest version of ElasticSearch and replace wget link below
# NEW WAY / EASY WAY
wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-0.90.3.deb
sudo dpkg -i elasticsearch-0.90.3.deb
var express = require('express')
, app = express()
app.get('*', function(req, res, next) {
res.sendfile(req.url.replace(/^\//, ''))
})
app.listen(1337);
mongoose = require 'mongoose'
Model = mongoose.Model
Query = mongoose.Query
setHooks = (hooks) ->
modifyCallback = ->
args = Array.prototype.slice.call arguments
args.forEach (arg, index) ->
if typeof arg is 'function'
@taterbase
taterbase / client.html
Last active December 27, 2015 21:39 — forked from supershabam/client.html
<!DOCTYPE html>
<html>
<head>
<script src='//polysocket.io/polysocket.js'></script>
<script>
var ps = new PolySocket('ws://echo.websocket.org')
ps.onmessage = function(e) {
console.log(e.data)
}
ps.onopen = function() {
@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)