Skip to content

Instantly share code, notes, and snippets.

View j1n3l0's full-sized avatar

Nelo Onyiah j1n3l0

  • Goznel Limited
  • Kent UK
  • 09:00 (UTC -12:00)
View GitHub Profile
use Test2::V0;
use Moo;
{
package Person;
use Moo;
has age => ( is => 'ro' );
}
{
# shellcheck shell=sh
nodenv() {
if has nodenv; then
export NODENV_VERSION="${1}"
else
echo "direnv: nodenv is not installed"
fi
}
@rougier
rougier / clean.el
Created May 10, 2020 02:43
A very minimal but elegant emacs configuration file
(require 'org)
(setq-default indent-tabs-mode nil)
(setq org-display-inline-images t)
(setq org-redisplay-inline-images t)
(setq org-startup-with-inline-images "inlineimages")
(setq default-frame-alist
(append (list '(width . 72) '(height . 40))))
@j1n3l0
j1n3l0 / override-isa.t
Created August 19, 2020 10:58
Override the response to ->isa fot Test2 mock objects
use Test2::V0;
subtest 'Overriding "isa" on a mock object' => sub {
isa_ok(
mock( {}, override => [ isa => sub { pop eq 'Foo' } ] ),
['Foo'],
'should correctly respond to "isa"',
);
};
@j1n3l0
j1n3l0 / scratch-ts-project.bash
Last active March 19, 2024 23:37
Set up a new development typescript project
#!/bin/bash
set -euxo pipefail
git init
npm init -y
npm install -D depcheck eslint eslint-config-prettier eslint-plugin-jsdoc eslint-plugin-json eslint-plugin-prettier husky lint-staged prettier
npm pkg set scripts.depcheck='depcheck'
npm pkg set scripts.lint-staged='lint-staged --allow-empty'