Skip to content

Instantly share code, notes, and snippets.

View mackbrowne's full-sized avatar
😼
Full Stack and Mobile Developer

Mack Browne mackbrowne

😼
Full Stack and Mobile Developer
View GitHub Profile
@mackbrowne
mackbrowne / gist:96e0e483dbb58326cf50cb4ddef727a8
Created March 20, 2017 17:31
Meteor-Slingshot s3 Delete Companion
// Found at - https://github.com/CulturalMe/meteor-slingshot/issues/50#issuecomment-80965314
// Add s3 package from atmosphere
AWS.config.update({
accessKeyId: Meteor.settings.private.amazonS3.AWSAccessKeyId,
secretAccessKey: Meteor.settings.private.amazonS3.AWSSecretAccessKey
});
var s3 = new AWS.S3();
var params = {
@mackbrowne
mackbrowne / gist:30317eba75d13683566ead357b52bbce
Last active June 19, 2017 15:09
Accounts Meteor Link Hack
Accounts.onCreateUser((options, user) => {
user.city = null;
user.networks = [];
user.attending = [];
if (user.profile == null) {
user.profile = {};
}
if (user.services != null) {
var service = _.keys(user.services)[0];
@mackbrowne
mackbrowne / gist:e119c025ebfc517950f5
Created June 27, 2014 15:50
Split json into multiple files using jq
cat data.json | jq -c -M '.data[]' | \
while read line; do echo $line > parts/$(date +%s%N).json; done
var items = [];
$.each($('tr'), function(i, row){
var item={}
$.each($('td', row), function(index, col){
switch(index){
case 0:
var query = $('a', col);
var size = query.size();
if(size>0){
item['Intro'] = $(query[0]).attr('href');