Skip to content

Instantly share code, notes, and snippets.

@XMB5
XMB5 / clion-install-1line.ps1
Last active February 26, 2019 19:38
Install CLion and the Cygwin toolchain with one powershell line
iex ((New-Object System.Net.WebClient).DownloadString('https://git.io/fhNsh'))
@XMB5
XMB5 / speedtest.sh
Created June 11, 2019 00:50
Command line download speed test, requires aria2c
#!/bin/bash
LINKS='http://mirror.math.princeton.edu/pub/ubuntu-iso/19.04/ubuntu-19.04-desktop-amd64.iso http://mirrors.layeronline.com/ubuntu-releases/19.04/ubuntu-19.04-desktop-amd64.iso http://mirrors.xtom.com/ubuntu-releases/19.04/ubuntu-19.04-desktop-amd64.iso http://mirror.easyspeedy.com/ubuntu-iso/19.04/ubuntu-19.04-desktop-amd64.iso http://mirrors.dotsrc.org/ubuntu-cd/19.04/ubuntu-19.04-desktop-amd64.iso'
aria2c --dir / -o /dev/null --allow-overwrite=true --file-allocation=none $LINKS
@XMB5
XMB5 / tls_secp256r1_gen.sh
Created November 13, 2020 19:32
generates a self-signed secp256r1 tls key + certificate
#!/bin/bash
# generates a self-signed secp256r1 tls key + certificate
if [ -z "$1" ] || [ -z "$2" ]; then
echo "usage: $0 <key.pem> <cert.pem>" 2>& 1
exit 1
fi
openssl req -new -newkey ec -pkeyopt ec_paramgen_curve:prime256v1 -x509 -nodes -batch -days 36500 -out "$2" -keyout "$1"