This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Meteor Up: Production Quality Meteor Deployments | |
------------------------------------------------ | |
Building Started: /path/to/the/app | |
Bundling Error: code=-1, error:spawn ENOENT | |
-------------------STDOUT------------------- | |
-------------------STDERR------------------- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on *:text:*:#:{ | |
var %m = $lower($1-) | |
var %n = $lower($me) | |
if (%n isin %m) noop $tip(me_tip,$nick mentioned you in #,$1-) | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Template.foo.events( | |
'submit form': (e)-> | |
e.preventDefault() | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ThingyCollection = new Meteor.Collection("thingy", { | |
transform: function (doc) { | |
if (doc.thingy) | |
doc.thingy = doc.thingy.toUpperCase(); | |
return doc; | |
} | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: [ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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', | |
}); |