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
// This is a manifest file that'll be compiled into application.js, which will include all the files | |
// listed below. | |
// | |
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts, | |
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path. | |
// | |
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the | |
// the compiled file. | |
// | |
// WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD |
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 = Npm.require('fs'); | |
var loadImages = function() { | |
var assets_folder = getAssetPath(); | |
var image = fs.readFileSync(assets_folder + '/20131022_GR-Limited-Edition.jpg', 'binary'); | |
//fs.writeFileSync('/Users/cram/Desktop/test.jpg', image, {encoding: 'binary', mode: 777}); | |
var saved = Images.storeBuffer('20131022_GR-Limited-Edition.jpg', image, {encoding: 'binary', noProgress: true, contentType: 'image/jpeg'}); | |
}; | |
loadImages(); |
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
function getAssetPath() { | |
var meteor_root = Npm.require('fs').realpathSync(process.cwd() + '/../'); | |
console.log(meteor_root); | |
var application_root = Npm.require('fs').realpathSync(meteor_root + '/../'); | |
// if running on dev mode | |
if (Npm.require('path').basename(Npm.require('fs').realpathSync(meteor_root + '/../../../')) == '.meteor') { | |
application_root = Npm.require('fs').realpathSync(meteor_root + '/../../../../'); | |
} |
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
// call the func every count times | |
var every = function(count, func) { | |
var self = this, | |
counter = 0; | |
return function(arg) { | |
counter++; | |
// console.log('counter is ' + counter); | |
if (counter === count) { | |
counter = 0; | |
// console.log("reset counter"); |
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 hookHandles = []; | |
var initCollectionHooks = function() { | |
//once the seed process is complete or no seeding takes place add the listener | |
hookHandles.push( | |
Collectibles.after.insert(function(userId, doc) { | |
// get the imageIds and set them as being linked | |
App.emitter.emit('collectible.added', userId, 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
git branch -m old_branch new_branch # Rename branch locally | |
git push origin :old_branch # Delete the old branch | |
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote |
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
license: mit |
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
license: mit |
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
license: mit |
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
license: mit |
OlderNewer