Skip to content

Instantly share code, notes, and snippets.

View j1n3l0's full-sized avatar

Nelo Onyiah j1n3l0

  • Goznel Limited
  • Kent UK
  • 06:52 (UTC -12:00)
View GitHub Profile
{
use Test::LectroTest::Compat;
use Test::LectroTest::Generator qw< :all >;
sub Positive_Int { Gen { abs Int->generate(@_) } }
holds(
Property {
##[ a <- Positive_Int, b <- Positive_Int ]##
my $c = sub { $_[0] + $_[1] }->( $a, $b );
#!/bin/sh
# Minimum perl configuration
export PLENV_VERSION="5.24.0"
cpan "local::lib" "App::cpm" "CPAN" "Log::Log4perl" "Term::ReadKey" "Term::ReadLine::Gnu" "YAML"
eval "$(perl -Mlocal::lib=local)"
@j1n3l0
j1n3l0 / basics.t
Last active September 12, 2019 08:14
MooX::Options and Test::More::subtest (also Test2::API::run_subtest) do not play well together
use 5.016;
use Test::More;
use Test::Exception;
package Script {
use Moo;
use MooX::Options;
option start => (
doc => 'Start running the application',
'use strict';
const chai = require('chai'),
chaiAsPromised = require('chai-as-promised'),
AWS = require('aws-sdk-mock'),
Demo = require('../src/demo'),
expect = chai.expect;
chai.use(chaiAsPromised);
=== npm audit security report ===
┌──────────────────────────────────────────────────────────────────────────────┐
│ Manual Review │
│ Some vulnerabilities require your attention to resolve │
│ │
│ Visit https://go.npm.me/audit-guide for additional guidance │
└──────────────────────────────────────────────────────────────────────────────┘
┌───────────────┬──────────────────────────────────────────────────────────────┐
use 5.026;
use Test2::V0;
use Data::Dumper::Concise qw< Dumper >;
use DBIx::Class::Migration;
use Path::Tiny qw< tempdir >;
use Test::mysqld;
my $mysqld = Test::mysqld->new(
my_cnf => {
@j1n3l0
j1n3l0 / dev.json
Last active April 13, 2019 01:47
Using Packer to build a Vagrant VM
{
"builders": [
{
"add_force": true,
"communicator": "ssh",
"source_path": "ubuntu/trusty64",
"type": "vagrant"
}
],
"provisioners": [
@j1n3l0
j1n3l0 / vagrant.sh
Last active March 7, 2019 11:29
install vagrant 2.2.4 with plugin vbguest on debian
#!/bin/sh -ex
# download and install vagrant
cd "$(mktemp -d)"
wget -qc "https://releases.hashicorp.com/vagrant/2.2.4/vagrant_2.2.4_x86_64.deb"
sudo dpkg -i "vagrant_2.2.4_x86_64.deb"
# install bash completion
wget -qc "https://raw.github.com/kura/vagrant-bash-completion/master/etc/bash_completion.d/vagrant"
sudo mv -v "vagrant" "/etc/bash_completion.d/"
use Test2::V0;
use PerlX::Maybe qw< :all >;
subtest 'provided_deref' => sub {
my $object = mock {} => (
add => [
count => sub { 1 },
interval => sub { 1 },
update => sub {
@j1n3l0
j1n3l0 / .envrc
Last active November 16, 2018 14:27
use perl ${PERL_VERSION}
eval $(perl -Mlocal::lib="${HOME}/.plenv/libs/${PERL_VERSION}@${LIB_NAME}")