Skip to content

Instantly share code, notes, and snippets.

View hackerzhut's full-sized avatar

Sara hackerzhut

View GitHub Profile
@hackerzhut
hackerzhut / imageResize.js
Created July 1, 2014 02:30
Resize image using Graphicsmagick and upload using S3
gm(request(url))
.resize("80^", "80^")
.stream(function (err, stdout, stderr) {
var chunks = [];
stdout.on('data', function (chunk) {
chunks.push(chunk);
});
stdout.on('end', function () {
var image = Buffer.concat(chunks);
var options = {
@hackerzhut
hackerzhut / es_gist
Created February 28, 2013 05:39
[ERROR] elasticsearch mongodb river - filter is null
[2013-02-28 13:29:02,102][INFO ][cluster.metadata ] [Kl'rt] [_river] creating index, cause [auto(index api)], shards [1]/[1], mappings []
[2013-02-28 13:29:02,249][INFO ][cluster.metadata ] [Kl'rt] [_river] update_mapping [mongodb] (dynamic)
[2013-02-28 13:29:02,290][INFO ][river.mongodb ] [Kl'rt] [mongodb][mongodb] river name [org.elasticsearch.river.RiverName@35f80e40] monitoring namespace [profile.person]
[2013-02-28 13:29:02,290][INFO ][river.mongodb ] [Kl'rt] [mongodb][mongodb] starting mongodb stream: host [localhost], port [27017], gridfs [false], filter [null], db [profile], indexing to [mongoindex]/[person]
[2013-02-28 13:29:02,325][INFO ][cluster.metadata ] [Kl'rt] [mongoindex] creating index, cause [api], shards [5]/[1], mappings []
[2013-02-28 13:29:02,480][INFO ][river.mongodb ] [Kl'rt] [mongodb][mongodb] Start indexer thread.
[2013-02-28 13:29:02,482][INFO ][river.mongodb ] [Kl'rt] [mongodb][mongodb] Start tailer thread.
[2013-0