Syntax
${varName/Pattern/Replacement}
Given a variable
$ val="test"
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
Syntax
${varName/Pattern/Replacement}
Given a variable
$ val="test"
# Python script to test ssl via ssllabs service | |
# - input: space or newline delimited set of hostnames to test | |
# - process: sends request, polls till results are complete | |
# - output: saves html page | |
# - output: prints summary results per site in csv | |
# - output format: <fqdn/hostname>,<http status code>,<overall rating>,<certficate score %>,<protocol support score %>,<key exchange score %>,<cipher strength score %> | |
# python libs to use | |
import csv | |
from lxml import html |
#!/usr/bin/env bash | |
if [ -z "$VIRTUAL_ENV" ] || [ "$VIRTUAL_ENV" -ne "/home/a211278l/bin/python-venvs/docker" ]; then | |
source ~/bin/python-venvs/docker/bin/activate | |
fi | |
sudo -E "$(which docker-compose)" $@ | |
deactivate |
Given a working directory and a folder c
with encrypted PDFs, use qpdf
, basename
and a bash
loop:
for f in c/*.pdf; do qpdf --password=<password> --decrypt $f "$(basename -s .pdf $f).pdf"; done
Boot failure was caused by installing spice-guest-tools which, if you read details about it, also includes the QXL driver and the install broke my Windows 10 build 17134 guest somehow. This occured on Ubuntu 16.04 LTS with QEMU emulator version 2.5.0.
BSOD with "page fault in nonpaged area" occurs after installing spice-guest-tools-latest.exe
. It possibly clobbers other stable/good versions of drivers.
Automatic boot repair fails. After going through advanced options and getting to a command prompt, inspect the boot repair logs:
A bash script that collects some useful commands to check Linux MD software arrays and component devices for some issues, e.g.
It can also display info. Set env var SHOW_INFO='y'
or anything else, e.g. 'n'
(default) to just report issues.