mongodump -h 127.0.0.1:27017 -u "DB_USER" -p "PASSWORD" --db DB_NAME --archive=$HOME/backup/dump.gz --gzip
As a root user, no auth.
mongorestore --host=127.0.0.1 --gzip --archive=dump.gz
:: Download Ubuntu 22.04 from Microsoft Store | |
:: Launch Ubuntu 22.04. The Ubuntu installation GUI window will be black. Close it. | |
:: Open PowerShell and start the setup in TUI mode | |
sl --shutdown | |
wsl --unregister Ubuntu-22.04 | |
ubuntu2204.exe --ui=tui | |
:: See | |
:: https://github.com/microsoft/WSL/issues/8525 |
#! /bin/bash | |
# Download trustlist, signature and certificate | |
wget https://ec.europa.eu/assets/eu-dcc/dcc_trustlist.zip | |
wget https://ec.europa.eu/assets/eu-dcc/dcc_trustlist.zip.sig.txt | |
wget https://ec.europa.eu/assets/eu-dcc/eu_signer.pem.txt | |
# Convert the signature file from base64 encoded to plain DER file | |
openssl base64 -a -A -d -in dcc_trustlist.zip.sig.txt -out dcc_trustlist.zip.sig.der | |
# Verify the integrity | |
openssl cms -verify -in dcc_trustlist.zip.sig.der -inform DER -content dcc_trustlist.zip -binary -CAfile eu_signer.pem.txt --out /dev/null |
# Download bfg for | |
# https://rtyley.github.io/bfg-repo-cleaner/ | |
java -jar bfg.jar --delete-files {filename} | |
git push --force |
"c:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe" --disable-web-security --disable-gpu --user-data-dir=c:/tmp/chromeTemp |
# Encrypt and zip | |
7za a -tzip -pMY_SECRET -mem=AES256 secure.zip doc.pdf doc2.pdf doc3.pdf | |
# Decrypt and unzip | |
7za e secure.zip |
# List all the ignored files previously commited | |
git ls-files -ci --exclude-standard | |
# Remove file from Git's history. It keeps it in the file system | |
git rm --cached path/to/file | |
# Remove all the ignored files | |
git ls-files -ci --exclude-standard -z | xargs -0 git rm --cached |
# Generate patch for last commit | |
git format-patch -1 HEAD | |
# Generate patches for last 2 commits | |
git format-patch -2 HEAD | |
# Combine the changes of the last 2 commits into on patch file | |
git format-patch -2 HEAD --stdout > combined.patch |
drush watchdog-delete all |
SELECT table_name, table_rows FROM INFORMATION_SCHEMA.TABLES [WHERE TABLE_SCHEMA = '**YOUR SCHEMA**';] |