Skip to content

Instantly share code, notes, and snippets.

View reduxdj's full-sized avatar

Patrick Lemiuex reduxdj

View GitHub Profile
@reduxdj
reduxdj / collections.coffee
Last active August 29, 2015 14:25 — forked from onepixelsolid/collections.coffee
Meteor - S3 file upload + thumbnailing
#
# FS Collection
#
profileThumbsStore = new FS.Store.S3('thumb',
accessKeyId : 'XXXXXXXXXXXXXXXXXX'
secretAccessKey : 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
bucket : 'my-bucket-name'
folder : 'thumb'
transformWrite : (fileObj, readStream, writeStream) ->
gm(readStream, fileObj.name()).resize("100", "100").stream().pipe writeStream
@reduxdj
reduxdj / app.js
Last active August 29, 2015 14:22 — forked from Tivoli/app.js
'use strict';
import React from 'react';
import Router from 'react-router';
import { canUseDOM } from 'react/lib/ExecutionEnvironment';
import routes from './routes';
let app = {
start(bootstrap) {
return canUseDOM ? this.webStart() : this.serverStart(bootstrap);
@reduxdj
reduxdj / app.js
Last active August 29, 2015 14:22 — forked from Tivoli/app.js
'use strict';
import React from 'react';
import Router from 'react-router';
import { canUseDOM } from 'react/lib/ExecutionEnvironment';
import routes from './routes';
let app = {
start(bootstrap) {
return canUseDOM ? this.webStart() : this.serverStart(bootstrap);
// includes bindings for fetching/fetched
var PaginatedCollection = Backbone.Collection.extend({
initialize: function() {
_.bindAll(this, 'parse', 'url', 'pageInfo', 'nextPage', 'previousPage');
typeof(options) != 'undefined' || (options = {});
this.page = 1;
typeof(this.perPage) != 'undefined' || (this.perPage = 10);
},
fetch: function(options) {
#!/bin/bash
#
# Note: This is the only file you *really* need. I've copied the contents
# of the important files that are part of our git repo for easier reading
# below :)
#
# I've prefixed this file with two dots to make it rise to the top of the
# gist. you can ignore those
#