Skip to content

Instantly share code, notes, and snippets.

auto-close-tag
auto-rename-tag
azure-account
beautify
bracket-pair-colorizer
code-settings-sync
code-spell-checker
daily
debugger-for-chrome
debugger-for-edge
@clubrob
clubrob / authorizeme.js
Created August 6, 2018 15:38
Simple JWT auth middleware function
// Firebase token auth middleware function to protect routes
function authorizeMe(req, res, next) {
let idToken;
// Grab token from POST header
if (
req.headers.authorization &&
req.headers.authorization.startsWith('Bearer ')
) {
idToken = req.headers.authorization.split('Bearer ')[1];
// Firebase function to verify token
@clubrob
clubrob / grid.css
Last active March 21, 2018 15:21
Super simple flexbox grid
.row {
display: flex;
justify-content: space-between;
}
.col20 { width: 18.999%; } //20% columns
.col30 { width: 28.999%; } //30% columns
.col40 { width: 38.999%; } //40% columns
.col50 { width: 48.999%; } //50% columns
.col60 { width: 58.999%; } //60% columns
.col70 { width: 68.999%; } //70% columns