Skip to content

Instantly share code, notes, and snippets.

View jbenner-radham's full-sized avatar

James Benner jbenner-radham

View GitHub Profile
import * as path from 'path';
import * as webpack from 'webpack';
const config: webpack.Configuration = {
entry: './lib/index.ts',
mode: 'production',
module: {
rules: [
{
exclude: /node_modules/,
@jbenner-radham
jbenner-radham / mocha-chai.code-snippets
Last active July 24, 2022 19:59
VS Code code snippets for Mocha & Chai tests.
/* vim: syntax=jsonc */
{
// Place your global snippets here. Each snippet is defined under a snippet name and has a scope, prefix, body and
// description. Add comma separated ids of the languages where the snippet is applicable in the scope field. If scope
// is left empty or omitted, the snippet gets applied to all languages. The prefix is what is
// used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders.
// Placeholders with the same ids are connected.
// Example:
@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