Skip to content

Instantly share code, notes, and snippets.

View robbplo's full-sized avatar

Robbin Ploeger robbplo

View GitHub Profile
@robbplo
robbplo / bit-record
Last active June 28, 2022 14:03
Bash script for recording terminal sessions and converting them to MP4 files. Download the file and place it in `/usr/local/bin` to make it globally available in the terminal.
#!/bin/bash
export BIT_RECORD=1
if [[ -z $1 ]]; then
echo "usage: bit-record [filename]"
echo "e.g. bit-record video.mp4"
exit 1
fi
@robbplo
robbplo / opendb.fish
Last active September 19, 2020 14:12 — forked from AlexVanderbist/opendb.sh
fish function of AlexVanderbist/opendb.sh
function opendb
[ ! -f .env ] && { echo "No .env file found."; exit 1; }
set DB_CONNECTION (grep DB_CONNECTION .env | grep -v -e '^\s*#' | cut -d '=' -f 2-)
set DB_HOST (grep DB_HOST .env | grep -v -e '^\s*#' | cut -d '=' -f 2-)
set DB_PORT (grep DB_PORT .env | grep -v -e '^\s*#' | cut -d '=' -f 2-)
set DB_DATABASE (grep DB_DATABASE .env | grep -v -e '^\s*#' | cut -d '=' -f 2-)
set DB_USERNAME (grep DB_USERNAME .env | grep -v -e '^\s*#' | cut -d '=' -f 2-)
set DB_PASSWORD (grep DB_PASSWORD .env | grep -v -e '^\s*#' | cut -d '=' -f 2-)
@robbplo
robbplo / xdebug.fish
Last active August 9, 2020 15:58
Fish shell function for toggling Xdebug
function xdebug
set iniFileLocation "/usr/local/etc/php/7.4/conf.d/ext-debug.ini";
set currentLine (cat $iniFileLocation | grep xdebug.so)
if string match -r \#zend_extension $currentLine
sed -i -e 's/^#zend_extension/zend_extension/g' $iniFileLocation
echo "xdebug is now active";
else
sed -i -e 's/^zend_extension/#zend_extension/g' $iniFileLocation

Keybase proof

I hereby claim:

  • I am robbplo on github.
  • I am robbin (https://keybase.io/robbin) on keybase.
  • I have a public key ASAVGVxCyiCWGKbI1sGIgevz13Z5DeyGHOMI8GfTFusVQwo

To claim this, I am signing this object: