Skip to content

Instantly share code, notes, and snippets.

View msukmanowsky's full-sized avatar
🥳
Building the future of how companies work with elvex!

Mike Sukmanowsky msukmanowsky

🥳
Building the future of how companies work with elvex!
View GitHub Profile
@msukmanowsky
msukmanowsky / cloud-function-firebase-auth.js
Last active March 14, 2019 16:25
Small Express middleware snippet for Cloud Functions to determine if a user is authenticated via Firebase Auth.
const admin = require('firebase-admin');
function getIdToken(req) {
const authHeader = req.header('Authorization') || '';
const parts = authHeader.split('Bearer ');
if (parts.length === 1) return null;
return parts[1];
}
@jimbojsb
jimbojsb / gist:1630790
Created January 18, 2012 03:52
Code highlighting for Keynote presentations

Step 0:

Get Homebrew installed on your mac if you don't already have it

Step 1:

Install highlight. "brew install highlight". (This brings down Lua and Boost as well)

Step 2: