Skip to content

Instantly share code, notes, and snippets.

View avrahamappel's full-sized avatar

Avraham Appel avrahamappel

View GitHub Profile
@avrahamappel
avrahamappel / php-macros.vim
Created July 26, 2022 19:49
Some vim macros for PHP
# 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
(function () { let minutes = parseInt(prompt("How many minutes?", "15")); setTimeout(() => document.body.innerHTML = '', minutes * 60 * 1000); })()