Skip to content

Instantly share code, notes, and snippets.

@ahmedalhulaibi
ahmedalhulaibi / push-git-good.sh
Created February 8, 2020 05:33
Git push with salt-n-pepa for zsh using preexec hook
# install coreutils to get timeout cmd
# install sox to get play cmd
# install libsox-fmt-mp3 to play mp3 files
# legally obtain Push It by Salt-n-Pepa, or get a band and recording studio and re-perform the first 4 seconds and save it in a music file
# add the below function to .zshrc
# this hook will play the music in the background so as to not interrupt your workflow
function preexec() {
[[ "$1" =~ "^git push.*" ]] && timeout -k 10s 4s play ~/Music/pushit.mp3 > /dev/null 2>&1 < /dev/null &
disown
@ahmedalhulaibi
ahmedalhulaibi / crystalball.go
Last active October 12, 2021 22:00
TinyGo Crystal Ball
package main
import (
"errors"
"io"
"machine"
"os"
"time"
)