Skip to content

Instantly share code, notes, and snippets.

View jbenner-radham's full-sized avatar

James Benner jbenner-radham

View GitHub Profile
@jbenner-radham
jbenner-radham / .vimrc
Last active March 18, 2024 21:36
My Vim config.
" Disable compatibility with vi which can cause unexpected issues.
set nocompatible
" Turn syntax highlighting on.
syntax on
" Add numbers to each line on the left-hand side.
set number
" Enable backspace in insert mode on macOS.
@jbenner-radham
jbenner-radham / adonisjs-crud-app-notes.md
Last active March 14, 2022 00:44
AdonisJS CRUD app notes.

AdonisJS CRUD App Notes

Initial Setup

Create your app scaffolding:

yarn create adonis-ts-app $APP_NAME
@jbenner-radham
jbenner-radham / index.js
Last active December 16, 2021 19:25
Using Jest with ES Modules (Without Babel)
export default () => ({});
@jbenner-radham
jbenner-radham / progname.1
Last active March 13, 2021 01:29
An mdoc skeleton document.
.Dd $Mdocdate$
.Dt PROGNAME 1
.Os
.\"
.Sh NAME
.\" ====
.Nm progname
.Nd ...
.\"
.Sh SYNOPSIS
@jbenner-radham
jbenner-radham / pkg.sh
Last active March 16, 2022 15:37
A JQ powered package.json query utility.
#!/usr/bin/env sh
set -o errtrace; set -o errexit; set -o pipefail
if [ -n "${1}" ]; then filter="${1}"; else filter=''; fi
jq ."${filter}" package.json
# sh
$ npm start
> Doing stuff...
More stuff...
# sh-session
$ npm start
@jbenner-radham
jbenner-radham / update-git-author-info.sh
Created October 22, 2019 13:04
Update Git author info.
#!/usr/bin/env sh
# From: https://help.github.com/en/github/using-git/changing-author-info
git filter-branch --env-filter '
OLD_EMAIL="[email protected]"
CORRECT_NAME="James Benner"
CORRECT_EMAIL="[email protected]"
#!/usr/bin/env sh
say --voice=Kyoko --rate=0 --interactive=bold rei ichi ni san yon go roku nana hachi kyuu juu juuichi juuni juusan juushi juugo juuroku juushichi juuhachi juuku nijuu nijuuichi nijuuni nijuusan nijuushi nijuugo nijuuroku nijuushichi nijuuhachi nijuuku sanjuu sanjuuichi sanjuuni sanjuusan sanjuushi sanjuugo sanjuuroku sanjuushichi sanjuuhachi sanjuuku yonjuu yonjuuichi yonjuuni yonjuusan yonjuushi yonjuugo yonjuuroku yonjuushichi yonjuuhachi yonjuuku gojuu gojuuichi gojuuni gojuusan gojuushi gojuugo gojuuroku gojuushichi gojuuhachi gojuuku rokujuu rokujuuichi rokujuuni rokujuusan rokujuushi rokujuugo rokujuuroku rokujuushichi rokujuuhachi rokujuuku nanajuu nanajuuichi nanajuuni nanajuusan nanajuushi nanajuugo nanajuuroku nanajuushichi nanajuuhachi nanajuuku hachijuu hachijuuichi hachijuuni hachijuusan hachijuushi hachijuugo hachijuuroku hachijuushichi hachijuuhachi hachijuuku kyuujuu kyuujuuichi kyuujuuni kyuujuusan kyuujuushi kyuujuugo kyuujuuroku kyuujuushichi kyuujuuhachi kyuujuuku hyakus
@jbenner-radham
jbenner-radham / lsdir.sh
Created September 4, 2019 21:26
Shell script to list only directories.
#!/usr/bin/env sh
lsdir () {
if [ "${1}" ]; then file=$1; else file='.'; fi
# shellcheck disable=SC2010
ls -Al "${file}" | grep '^d' | awk '{print $NF}'
}