Skip to content

Instantly share code, notes, and snippets.

View taterbase's full-sized avatar

George Shank taterbase

View GitHub Profile
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)
db = require "../lib/db"
Q = require "q"
_ = require "lodash"
GROUP = "messages"
getNewId = (cb) ->
db.getNewIdFor(GROUP, cb)
class Message
@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 / 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
@taterbase
taterbase / es.sh
Created January 22, 2013 19:47 — forked from sgringwe/es.sh
cd ~
sudo apt-get update
sudo apt-get install openjdk-7-jre-headless -y
# Download the compiled elasticsearch rather than the source.
wget http://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-0.20.2.tar.gz -O elasticsearch.tar.gz
tar -xf elasticsearch.tar.gz
rm elasticsearch.tar.gz
sudo mv elasticsearch-* elasticsearch
sudo mv elasticsearch /usr/local/share
@taterbase
taterbase / index.html
Created August 15, 2012 15:48 — forked from anonymous/index.html
A web page created at CodePen.io.
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<!-- IF PEN IS PRIVATE -->
<!-- <meta name="robots" content="noindex"> -->
<!-- END -->
@taterbase
taterbase / proxyServer
Created July 1, 2012 19:29 — forked from randylubin/proxyServer
Node.js Multi-App Proxy Server with Forwarding
var http = require('http'),
httpProxy = require('http-proxy');
//
// Setup proxy server with forwarding
//
var options = {
router: {
'proxytest.randylubin.com': '127.0.0.1:7200',
'randylubin.com': '127.0.0.1:7200',
@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...)