Skip to content

Instantly share code, notes, and snippets.

View iamanam's full-sized avatar

Anamul Hasan iamanam

View GitHub Profile
@iamanam
iamanam / log.log
Created July 31, 2016 08:20
choco log file for troubleshooting
λ Choco list -verbose -debug
Chocolatey is running on Windows v 10.0.10586.0
Attempting to delete file "C:/ProgramData/chocolatey/choco.exe.old".
Attempting to delete file "C:\ProgramData\chocolatey\choco.exe.old".
Command line: "C:\ProgramData\chocolatey\choco.exe" list -verbose -debug
Received arguments: list -verbose -debug
NOTE: Hiding sensitive configuration data! Please double and triple
check to be sure no sensitive data is shown, especially if copying
output to a gist for review.
@iamanam
iamanam / mongo_backup.mjs
Created May 30, 2022 07:57
Simple scripts to backup remote mongoDB database locally
#!/usr/bin/env zx
const MONGO_URL = null; // you can just use mongo url rather than specifying details seperately below.
const HOST = "100.71.227.53"; // host ip address
const PORT = "27017"; // port of mongo database usually 27017
const AUTH_DB_NAME = "admin"; // usually admin
const MONGO_USERNAME = "username"; // username for mongodb
const MONGO_USERPASS = "password"; // password for the user
const MONGO_OUTPUT_DIR = "/Users/somename/Documents"; // folder where the backup will be saved