Skip to content

Instantly share code, notes, and snippets.

Avatar

Avraham Appel avrahamappel

View GitHub Profile
@avrahamappel
avrahamappel / uri-lati-dl.sh
Last active March 16, 2023 23:25
Download shiur
View uri-lati-dl.sh
#!/usr/bin/env nix-shell
#! nix-shell -i bash -p yt-dlp
#
# Download shiur from [Rabbi Uri Lati's YouTube channel](https://www.youtube.com/@UriLati) and convert it into something
# [my phone's podcast player](https://www.kaiostech.com/store/apps/?bundle_id=com.kaiostech.podkast) can use
usage () {
echo "USAGE:"
echo "uri-lati-dl.sh <url>"
}
@avrahamappel
avrahamappel / php-macros.vim
Created July 26, 2022 19:49
Some vim macros for PHP
View php-macros.vim
# Boilerplate for PHP class
let @p='i%dawO<?"
onamespaceJ:s~Äku
/wdf\....~AÄkb {}F\s;
class '
# Turn a test name comment into a snake-cased class method (PHPUnit)
let @t=':s#[^/ ]\zs #_#g
^ciwpublic functionA()o{
@avrahamappel
avrahamappel / tabTimer.js
Last active June 3, 2022 17:35
Make browser tab blank after X minutes
View tabTimer.js
(function () { let minutes = parseInt(prompt("How many minutes?", "15")); setTimeout(() => document.body.innerHTML = '', minutes * 60 * 1000); })()