Skip to content

Instantly share code, notes, and snippets.

View jamielob's full-sized avatar

Jamie Loberman jamielob

View GitHub Profile
import { Meteor } from 'meteor/meteor';
import Sendgrid from 'sendgrid';
import * as helper from 'sendgrid/lib/helpers/mail/mail';
import _ from 'lodash';
// Article
// https://medium.com/@jamielob/sending-branded-emails-from-node-js-66ffa9c5a6c6#.kddhj4go6
export const sendTemplateEmail = ({
templateId,
@jamielob
jamielob / upload.js
Created October 18, 2016 23:07 — forked from cmcewen/upload.js
Upload image from React Native to Cloudinary
var CryptoJS = require('crypto-js');
function uploadImage(uri) {
let timestamp = (Date.now() / 1000 | 0).toString();
let api_key = 'your api key'
let api_secret = 'your api secret'
let cloud = 'your cloud name'
let hash_string = 'timestamp=' + timestamp + api_secret
let signature = CryptoJS.SHA1(hash_string).toString();
let upload_url = 'https://api.cloudinary.com/v1_1/' + cloud + '/image/upload'
@jamielob
jamielob / Atom snippets sample
Created July 13, 2016 19:46
A sample of the ES6 React snippets that I use in Atom
'.source.js':
'Component - Function (React+Meteor)':
'prefix': 'component'
'body': '''
import React from 'react';
const $1 = () => (
<div>
$2
@jamielob
jamielob / Meteor IOS facebook login guide.markdown
Last active April 8, 2017 19:54
Meteor cordova ios facebook login

How to get facebook login working with Meteor and Cordova on iOS

Step 1: Make your local dev site internet accessible

Because there is an issue with OAuth2 login and localhost development, you currently have to deploy your meteor site to be able to test the Facebook login. A nice little workaround for this is to make the local instance of meteor accessible externally.

There is a great online guide for setting up port forwarding with your router and you can check your public external IP here.

For example, If you have an Apple router, simply open up Airport Utility on your Mac and click edit on your router, then go to the Network tab. Under Port Settings click the + icon and select Personal Web Sharing, setting all of the public and private ports to 3000. Make sure the private IP is set to your current computer IP.