Skip to content

Instantly share code, notes, and snippets.

View au-phiware's full-sized avatar

Corin Lawson au-phiware

View GitHub Profile
@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;
}
@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 / CursorRecyclerAdapter.java
Last active November 5, 2015 05:55 — forked from quanturium/CursorRecyclerAdapter.java
A simple implementation of CursorAdapter for the new RecyclerView. It is designed to work with CursorLoaders and do not register any content observer (which can cause leaks if not handled properly)
/*
* The MIT License (MIT)
*
* Copyright (c) 2015 ARNAUD FRUGIER
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
@au-phiware
au-phiware / timeline.css
Last active August 29, 2015 14:10 — forked from LibertysYarn/timeline.css
Timeline with centred panel and double-sided item
.timeline {
list-style: none;
padding: 20px 0 20px;
position: relative;
}
.timeline:before {
top: 0;
bottom: 0;
position: absolute;
{
"vars": {
"@gray-base": "#000",
"@gray-darker": "lighten(@gray-base, 13.5%)",
"@gray-dark": "lighten(@gray-base, 20%)",
"@gray": "lighten(@gray-base, 33.5%)",
"@gray-light": "lighten(@gray-base, 46.7%)",
"@gray-lighter": "lighten(@gray-base, 93.5%)",
"@brand-primary": "#428bca",
"@brand-success": "#5cb85c",