Skip to content

Instantly share code, notes, and snippets.

Scott Mackenzie hihellosm

Block or report user

Report or block hihellosm

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@hihellosm
hihellosm / collections.coffee
Created Nov 12, 2014
Meteor - S3 file upload + thumbnailing
View collections.coffee
#
# 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
@hihellosm
hihellosm / MeteorSublimeTextProjectPrefs.json
Last active Oct 24, 2015
Meteor JS Sublime Text project preferences to ignore '.meteor', 'packages' (and other) folders for the purposes of better search. Reference → http://css-tricks.com/exclude-compiled-css-from-sublime-text-2-projects
View MeteorSublimeTextProjectPrefs.json
{
"folders":
[
{
"path": "/path/to/my/app/",
"folder_exclude_patterns": [".meteor", "packages"]
}
]
}
View Meteor Mini Pages Routes
checkLoggedIn = (obj) ->
page = obj.page.defaultTemplate
if Meteor.loggingIn()
console.log 'Logging in'
if not Meteor.user() and page isnt 'login'
this.redirect('/login')
else
if Meteor.user() and page is 'login'
You can’t perform that action at this time.