Skip to content

Instantly share code, notes, and snippets.

View jakob-stoeck's full-sized avatar
🥋
git happens

Jakob Stoeck jakob-stoeck

🥋
git happens
View GitHub Profile
@jakob-stoeck
jakob-stoeck / streamtester.php
Created February 7, 2017 12:06
stream tester
<?php
// You can use this file to test different video products in different players
// choose product and options
$product = 'hls'; // hls|stream_packaging|vod
$secure = true;
$staging = false;
$URLonly = false; // true to output only URL, false to output HTML
// no changes required below santa claus - happy holidays 2016
@jakob-stoeck
jakob-stoeck / vpn.sh
Last active December 11, 2020 05:55
Autofill Cisco VPN password saved in macOS keychain
#!/bin/sh
if [[ $# < 2 ]]; then
echo "Use password saved in macOS keychain for Cisco VPNs"
echo "$0 usage: myscript vpnname keychainitem [close_second_window]"
exit 1
fi
VPNName=$1 # match the name of the VPN service to run
keychainItem=$2 # this name has to match "Account" for the entry you make in keychain
password=$(security find-generic-password -wl "$keychainItem")
@jakob-stoeck
jakob-stoeck / brew-upgrade-parallel.sh
Last active February 26, 2024 07:07
homebrew parallel download and update
brew outdated | parallel --keep-order brew fetch --deps && brew upgrade
# without GNU parallel (output will be out of order):
brew outdated -q | xargs -L1 -P8 brew fetch --deps
@jakob-stoeck
jakob-stoeck / booktabs.gs
Created January 15, 2025 03:25
Create LaTeX booktabs-like tables in Google Docs
// Create a table with less bloat in Google Docs
// No vertical lines, and no horizontal lines except for header and footer
// Inspired by https://ctan.org/pkg/booktabs
function createBooktabsTable() {
// Table configuration
const numRows = 5; // Adjust as needed
const numCols = 4; // Adjust as needed
const doc = DocumentApp.getActiveDocument();
createBooktabsTableInternal(numRows, numCols, doc)