apt install p11-kit
sudo mv /usr/lib/firefox/libnssckbi.so /usr/lib/firefox/libnssckbi.so.bak
sudo ln -s /usr/lib/x86_64-linux-gnu/pkcs11/p11-kit-trust.so /usr/lib/firefox/libnssckbi.so
# Obviously you're appending these sections. | |
[core] | |
ignorecase = true | |
[merge] | |
renormalize = true | |
tool = msaccess-merge | |
[mergetool "msaccess-merge"] | |
cmd = $(git rev-parse --show-toplevel)/msaccess-merge "$BASE" "$LOCAL" "$REMOTE" "$MERGED" | |
trustExitCode = true |
import requests | |
from furl import furl | |
class RelativeSession(requests.Session): | |
def __init__(self, base_url): | |
super(RelativeSession, self).__init__() | |
self.__base_url = furl(base_url) | |
def request(self, method, url, **kwargs): | |
url = str(self.__base_url / url) |
# Start | |
- printf "\e[0Ksection_start:`date +%s`:execution_section_0[collapsed=true]\r\e[0KEnvironment Info\n" | |
# End | |
- printf "section_end:`date +%s`:execution_section_0\r\e[0K" |
# Compile and install certificates for the Java trust keystore | |
# and main keystore. Let's face it, this is everyone's keystore password. | |
# Note I install java very flatly normally. | |
COPY trust-certs/ /usr/local/share/ca-certificates/ | |
RUN update-ca-certificates && \ | |
ls -1 /usr/local/share/ca-certificates | while read cert; do \ | |
openssl x509 -outform der -in /usr/local/share/ca-certificates/$cert -out $cert.der; \ | |
/java/bin/keytool -import -alias $cert -keystore /java/jre/lib/security/cacerts -trustcacerts -file $cert.der -storepass changeit -noprompt; \ | |
rm $cert.der; \ | |
done |
[Unit] | |
Description=Maintain a reverseit SSH connection | |
After=network.target | |
StartLimitBurst=5 | |
# This line disables the "stop forever" start back off | |
StartLimitIntervalSec=0 | |
[Service] | |
Type=simple |
apt install p11-kit
sudo mv /usr/lib/firefox/libnssckbi.so /usr/lib/firefox/libnssckbi.so.bak
sudo ln -s /usr/lib/x86_64-linux-gnu/pkcs11/p11-kit-trust.so /usr/lib/firefox/libnssckbi.so
Script for bulk cloning of Github repositories.
# Generate a 128-bit identifier, encoded entirely in b32 lowercase. No special characters. | |
function safeid() { | |
python3 -c 'import uuid, base64 ; print(base64.b32encode(uuid.uuid4().bytes).lower().rstrip(b"=").decode())' | |
} |
import argparse | |
import json | |
class KeyValueJsonAction(argparse.Action): | |
""" | |
Argparse action for generating dictionaries from key-value args with JSON support | |
""" | |
def __call__(self, parser, namespace, values, option_string=None): | |
result = {} | |
for entry in values: |
# See: https://stackoverflow.com/questions/59895/how-to-get-the-source-directory-of-a-bash-script-from-within-the-script-itself | |
# Note: you can't refactor this out: its at the top of every script so the scripts can find their includes. | |
SOURCE="${BASH_SOURCE[0]}" | |
while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink | |
DIR="$( cd -P "$( dirname "$SOURCE" )" >/dev/null 2>&1 && pwd )" | |
SOURCE="$(readlink "$SOURCE")" | |
[[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located | |
done | |
SCRIPT_DIR="$( cd -P "$( dirname "$SOURCE" )" >/dev/null 2>&1 && pwd )" |