Skip to content

Instantly share code, notes, and snippets.

@milvus1
milvus1 / passport.js
Created July 8, 2017 00:59 — forked from manjeshpv/passport.js
Passport.js using MySQL for Authentication with Express
// config/passport.js
// load all the things we need
var LocalStrategy = require('passport-local').Strategy;
var mysql = require('mysql');
var connection = mysql.createConnection({
host : 'localhost',
user : 'root',
@milvus1
milvus1 / github-backup.sh
Created February 15, 2022 07:52 — forked from tylerhall/github-backup.sh
Sync all of my GitHub repos to a backup server every night
#!/bin/bash
# You need a GitHub token with repo access for your account. You can create one here...
# https://github.com/settings/tokens
GITHUB_TOKEN=abc123
cd ~
mkdir github
cd github