Skip to content

Instantly share code, notes, and snippets.

View carloswalterbr's full-sized avatar

Carlos Walter Developer Brazil carloswalterbr

  • carloswalter.com
View GitHub Profile
@carloswalterbr
carloswalterbr / passport.js
Created February 15, 2020 15:25 — 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',
#!/bin/bash
URL="http://doxieflashair.local"
DIRS="/DCIM/100DOXIE"
list () {
curl -s "${URL}/command.cgi?op=100&DIR=${1}" \
| awk 'BEGIN { FS=","; OFS="/" } /.+,(.+,){3}/ { print $1,$2 }'
}