Skip to content

Instantly share code, notes, and snippets.

View sandys's full-sized avatar

Sandeep Srinivasa sandys

View GitHub Profile
@sandys
sandys / server.R
Created November 30, 2015 20:01 — forked from MattSandy/server.R
Creates a websocket based JSON server
#Connect to this using websockets on port 9454
#Send in the format of {"data":[1,2,3]}
#The ppp returns the standard deviation of the sent array
library(jsonlite)
library(httpuv)
#server
app <- list(
onWSOpen = function(ws) {
ws$onMessage(function(binary, message) {
write(message, file = "log.txt",append = TRUE, sep = "\n")

Amazon Web Services Guide

Introduction

@sandys
sandys / build.sbt
Created October 26, 2013 04:59 — forked from sam/build.sbt
name := "foo"
version := "1.0-SNAPSHOT"
scalaVersion := "2.10.3"
scalacOptions in ThisBuild ++= Seq(
"-language:_",
"-feature",
"-unchecked",
@sandys
sandys / README.md
Created October 12, 2013 13:04 — forked from nikcub/README.md
@sandys
sandys / postsql.sql
Created October 12, 2012 15:52 — forked from tobyhede/postsql.sql
PostgreSQL as JSON Document Store
-- PostgreSQL 9.2 beta (for the new JSON datatype)
-- You can actually use an earlier version and a TEXT type too
-- PL/V8 http://code.google.com/p/plv8js/wiki/PLV8
-- Inspired by
-- http://people.planetpostgresql.org/andrew/index.php?/archives/249-Using-PLV8-to-index-JSON.html
-- http://ssql-pgaustin.herokuapp.com/#1
-- JSON Types need to be mapped into corresponding PG types
--
@sandys
sandys / gist:3351411
Created August 14, 2012 18:15 — forked from l0b0/gist:3217470
Simple merge example
#!/usr/bin/env bash
set -o errexit -o nounset -o pipefail
cd "$(mktemp --directory)"
git init
cat > test.txt <<EOF
alfa
bravo
charlie