Skip to content

Instantly share code, notes, and snippets.

View chug2k's full-sized avatar

Charles Lee chug2k

  • San Francisco, CA
View GitHub Profile
@staltz
staltz / introrx.md
Last active July 6, 2024 08:47
The introduction to Reactive Programming you've been missing
@cgiacomi
cgiacomi / passport.js
Last active February 20, 2018 05:05
BearerStrategy using a JWT token
/*
* Bearer strategy for token authentication when accessing API endpoints
*/
passport.use(new BearerStrategy(
function(token, done){
try {
//we attempt to decode the token the user sends with his requests
var decoded = jwt.decode(token, tokenSecret);
//TODO: must check the token expiry and ensure the token is still valid
module.exports = function liveReload(opt) {
var opt = opt || {};
var port = opt.port || 35729;
var excludeList = opt.excludeList || ['.woff', '.js', '.css', '.ico'];
function getSnippet() {
/*jshint quotmark:false */
var snippet = [
"<!-- livereload script -->",
"<script type=\"text/javascript\">document.write('<script src=\"http://'",

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name: