Skip to content

Instantly share code, notes, and snippets.

View au-phiware's full-sized avatar

Corin Lawson au-phiware

  • Victoria, Australia
View GitHub Profile
@au-phiware
au-phiware / builder-seq.png
Last active December 3, 2025 13:01
Taking Copilot From Intern To Trusted Teammate
builder-seq.png

title: Introduction to Go sub_title: A Masterclass author: MachShip theme: name: catppuccin-mocha override: intro_slide: title: font_size: 4

@au-phiware
au-phiware / README.md
Created September 28, 2023 15:04
Go Generics: Tips, Tricks, and Pitfalls

Setting the Stage

Right off the bat, I recommend reading the official Go blog article that introduces generics, it's authoritative and to the point, which this article is neither. Instead, I want to add some colour to Go generics with a little of my personal experience.

Let's begin by talking about mocking: I have no argument that disciplined use of mocking objects is best practice, but more often than not, I am frustrated with the existing options for mocking Go interfaces. The Go ecosystem offers a surprising variety of options for generating, building, and integrating mocks into your favourite test rig. Personally, I find that they have numerous and complicated options, and cumbersome APIs. Usually they have at least one limitation, for example they don't work well with a composite of small interfaces, or dealing with high ordered functions is mind-meltingly difficult. I yearn for a mock that will simply and enthusiastically accept a function that can be tailored t

@au-phiware
au-phiware / .gitattributes
Last active November 26, 2023 22:32
mock module
go.sum -diff -merge
@au-phiware
au-phiware / vue-tests-mocha-webpack-with-coverage.md
Created September 29, 2020 03:27 — forked from lsapan/vue-tests-mocha-webpack-with-coverage.md
Setting up Vue tests (with coverage) for mocha and Webpack

Setting up Vue tests (with coverage) for mocha and Webpack

There are seemingly a few incompatibilities with Vue and Istanbul/nyc at the moment, making it a bit difficult to set up proper coverage reporting for Vue files. Thankfully, there's a relatively easy way to fix that!

This will walk you through everything you need to do to add tests and coverage reporting to your vue-cli based project.

  1. Install dependencies for testing and coverage reporting

    yarn add -D @vue/cli-plugin-unit-mocha @vue/test-utils istanbul-instrumenter-loader nyc
    
@au-phiware
au-phiware / index.html
Last active August 13, 2020 23:51 — forked from d3noob/index.html
Sankey Diagram with v4
<!DOCTYPE html>
<meta charset="utf-8">
<title>SANKEY Experiment</title>
<style>
.node rect {
cursor: move;
fill-opacity: .9;
shape-rendering: crispEdges;
}
# If applied, this commit will...
# Why is this change needed?
Prior to this change,
# How does it address the issue?
This change
# Provide links to any relevant tickets, articles or other resources
@au-phiware
au-phiware / .gitignore
Last active February 14, 2019 06:14
.spacemacs.d
.spacemacs.env
@au-phiware
au-phiware / vsls
Created February 4, 2019 23:49 — forked from b333z/vsls
vccode live share nixos
#!/usr/bin/env bash
# TODO: Look at nixpkgs/pkgs/build-support/setup-hooks/auto-patchelf.sh
# https://ms-vsliveshare.gallery.vsassets.io/_apis/public/gallery/publisher/MS-vsliveshare/extension/vsliveshare/0.3.423/assetbyname/Microsoft.VisualStudio.Services.VSIXPackage
# Dangerous:
# curl -q https://gist.githubusercontent.com/b333z/5fb902161685c5141bbc91b39a152831/raw/f65d2d0feb475b693c779eeb74fd52ca46b32916/vsls | bash
set -eu
@au-phiware
au-phiware / .dockerignore
Last active November 26, 2017 22:32
Server-side rendering of html entities.
out
node_modules
package.json
main.js
*.jar
.git
.gitignore
Dockerfile
README.md
.dockerignore