Skip to content

Instantly share code, notes, and snippets.

@OlliV
OlliV / table.cbl
Last active August 19, 2016 00:32
x[1] in COBOL
IDENTIFICATION DIVISION.
PROGRAM-ID. HELLO.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 INDX PIC 9(1) VALUE 1.
01 WS-TABLE.
05 Nmbrs OCCURS 5 TIMES PIC 9(1).
@OlliV
OlliV / gist:c3da17db65b820007f36ed5b4e3725c7
Created December 25, 2019 21:40
MacOS low priority IO throtling
sudo sysctl debug.lowpri\_throttle_enabled
sudo sysctl debug.lowpri\_throttle_enabled=0
sudo sysctl debug.lowpri\_throttle_enabled=1
@OlliV
OlliV / cloudflare-azure_app.md
Created April 3, 2020 06:42
Use CloudFlare Origin certs with Azure App Services
  1. Create an origin certificate in CloudFlare

SSL/TLS -> Origin Server -> Create Certificate

  1. Convert the PEM cert to PFX
openssl pkcs12 -export -out domain.pfx -inkey domain.key -in domain.crt
@OlliV
OlliV / paste.js
Created January 11, 2021 09:56
Allow pasting in Chromium when a site blocks it
var allowPaste = function(e){
e.stopImmediatePropagation();
return true;
};
document.addEventListener('paste', allowPaste, true);
#!/usr/bin/env bash
set -euo pipefail
: "${2:?Version} ${1:?Package name}"
# e.g. fftw
name=${1}
# e.g. 3.3.10
ver=${2}
arch=${3:-big_sur}
outfile="${name}_${ver}-${arch}.tar.gz"
echo Downloading ${outfile}