Skip to content

Instantly share code, notes, and snippets.

@sposmen
sposmen / kinesis-2013-11-04.js
Last active December 29, 2015 10:29 — forked from chrishamant/kinesis-2013-11-04.js
DEPRECATED - Actually AWS-SDK-JS has kinesis support

Its relatively easy to stub in support for new services using their sdks. I have an application I'm trying this service out with and have stubbed rudimentary support for this service.

Just fetch this library locally, install the deps and npm link it.

  • copy kinesis-2013-11-04.js to lib/services/api/kinesis-2013-11-04.js
  • copy kinesis.js to lib/services/kinesis.js
  • you'll also need to add the line 'require('./services/kinesis');' to lib/services.js Since this is a json based api this pretty much works how I want it - only nag is I have to manually base64 encode/decode a Buffer for the 'Data' field of 'putRecord'

The service definition is really woefully incomplete with only input parameters specified for 'createStream','describeStream','getNextRecords','getShardIterator','listStreams' and 'putRecord' - you'll have to add the parameters for the other operations yourself if needed. I didn't waste too much time doing this cause I'm pretty sure this stuff just gets automagically generated from a service defin

@sposmen
sposmen / gist:3973289
Created October 29, 2012 12:38 — forked from abimaelmartell/gist:3929229
Ubuntu 12.10 setup (rbenv/rvm, janus, postgres)

Basic pre-requisites

  • Some utilities:
sudo apt-get install vim tmux git curl
  • Copy/paste from the command line:
sudo apt-get install xclip
@sposmen
sposmen / Query.sql
Created May 29, 2012 20:47 — forked from elhoyos/Query.sql
Sort by two factors
-- Todos los artículos de 'RAFA' primero ordenados por serial y luego el resto de artículos ordenados igualmente por serial.
SELECT a.* FROM articulos a LEFT JOIN (SELECT 'RAFA' COLLATE utf8mb4_general_ci AS nombre) r on r.nombre = a.usuario
ORDER BY r.nombre DESC, serial