Skip to content

Instantly share code, notes, and snippets.

@kmcnellis
kmcnellis / firebaseImportUsersMD5.js
Created September 15, 2017 20:03
How to import users in Firebase using MD5 Hashing
var crypto = require('crypto');
var fs = require('fs');
var exec = require('child_process').exec;
var uploadCommand = "firebase auth:import users.json --hash-algo=MD5 --rounds=0";
var stringToBase64 = function(plaintext){
return new Buffer(plaintext).toString('base64');
}
var users = [

Keybase proof

I hereby claim:

  • I am kmcnellis on github.
  • I am kmcnellis (https://keybase.io/kmcnellis) on keybase.
  • I have a public key whose fingerprint is 0E5F E78E BD12 8FEC D6B0 81C7 64A1 18DD 146D 24EC

To claim this, I am signing this object:

@kmcnellis
kmcnellis / roc
Created March 14, 2015 05:12
ROC for Mac
#!/bin/sh
#ROC for mac
echo $@
$@
while fswatch -r --one-event .
do
$@
done
@kmcnellis
kmcnellis / html
Created March 14, 2015 05:10
Reload Page in Safari or Chrome for mac
#Google Chrome on Mac
#osascript -e 'tell application "Google Chrome" to tell the active tab of its first window to reload'
#Safari
osascript -e 'tell application "Safari" to set docUrl to URL of document 1
tell application "Safari" to set URL of document 1 to docUrl'
@kmcnellis
kmcnellis / setup.sh
Last active August 29, 2015 14:03
HWserver directory setup
#!/bin/bash
setup_dir=$(pwd)
repodir="gradingcode"
repodepth="../"
echo $setup_dir
# Setup a basic project (DEVELOP or MASTER)
read -p "Clone develop? (n = master, o = other) (y|n|o) " dev
dev="${dev:-y}"