Skip to content

Instantly share code, notes, and snippets.

View dkreider's full-sized avatar
🤠
Breaking my keyboard...

Daniel Kreider dkreider

🤠
Breaking my keyboard...
View GitHub Profile
@dkreider
dkreider / add-ca-cert.js
Created July 5, 2019 14:41 — forked from mozfreddyb/add-ca-cert.js
privileged JS for Firefox to add a certificate as a trusted CA
if (typeof Cc == "undefined") { Cc = Components.classes; }
if (typeof Cu == "undefined") { Cu = Components.utils; }
if (typeof Ci == "undefined") { Ci = Components.interfaces; }
const nsX509CertDB = "@mozilla.org/security/x509certdb;1";
const nsIX509Cert = Ci.nsIX509Cert;
const nsIX509CertDB = Ci.nsIX509CertDB;
const certdb = Cc[nsX509CertDB].getService(nsIX509CertDB);
let certstring = `-----BEGIN CERTIFICATE-----
@dkreider
dkreider / mongo_backup.sh
Last active June 3, 2019 12:34 — forked from sheharyarn/mongo_backup.sh
Mongodump Shell Script for Cronjob
#!/bin/bash
MONGO_DATABASE="your_db_name"
MONGO_HOST="127.0.0.1"
MONGO_PORT="27017"
TIMESTAMP=`date +%F`
MONGODUMP_PATH="/usr/bin/mongodump"
BACKUPS_DIR="/home/username/backups/$APP_NAME"
BACKUP_NAME="$TIMESTAMP"