Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
# Check for Homebrew,
# Install if we don't have it
if test ! $(which brew); then
echo "Installing homebrew..."
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew doctor
fi
var createThumb = function(fileObj, readStream, writeStream) {
var finalImageSize = 320;
var orig = gm(readStream, fileObj.name())
console.log("transforming");
orig.size(function(err, size) {
console.log(size,err); /// <<<--- this is the only place i can get the dimensions to cut crop
Meteor Up: Production Quality Meteor Deployments
------------------------------------------------
Building Started: /path/to/the/app
Bundling Error: code=-1, error:spawn ENOENT
-------------------STDOUT-------------------
-------------------STDERR-------------------
server {
listen 80;
server_name dev.websitename.com.au;
location / {
proxy_pass http://localhost:4001;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
on *:text:*:#:{
var %m = $lower($1-)
var %n = $lower($me)
if (%n isin %m) noop $tip(me_tip,$nick mentioned you in #,$1-)
}
Template.foo.events(
'submit form': (e)->
e.preventDefault()
)
ThingyCollection = new Meteor.Collection("thingy", {
transform: function (doc) {
if (doc.thingy)
doc.thingy = doc.thingy.toUpperCase();
return doc;
}
});
@aaronthorp
aaronthorp / 0_reuse_code.js
Last active August 29, 2015 14:10
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@aaronthorp
aaronthorp / cfs.js
Last active August 29, 2015 14:08
CFS FileSystem
FS.TempStore.Storage = new FS.Store.FileSystem("_tempstore", {
internal : true,
path : '/mnt/data/tmp',
});
SpreadsheetFS = new FS.Collection("spreadsheets", {
stores: [new FS.Store.FileSystem("spreadsheets", {path: "/app-storage/uploads"})],
filter: {
allow: {
contentTypes: [
@aaronthorp
aaronthorp / cfs.js
Created October 29, 2014 00:26
Modulus.io CollectionFS Filesystem Tempstore fix
// Declare custom tempstore path for Modulus.io
//
// can also use: process.env.TEMP_DIR instead of "/mnt/data/tmp"
//
if (Meteor.isServer) {
FS.TempStore.Storage = new FS.Store.FileSystem("_tempstore", {
internal : true,
path : '/mnt/data/tmp',
});