Skip to content

Instantly share code, notes, and snippets.

View uglow's full-sized avatar
🟪
DigIO

Brett Uglow uglow

🟪
DigIO
View GitHub Profile
{
"meta": { "theme": "flat"},
"basics": {
"name": "Brett Uglow",
"label": "Principal Software Engineer",
"image": "https://miro.medium.com/fit/c/240/240/1*NLIN2YcenYtOxdJzQQpG5w.jpeg",
"email": "u_glow@hotmail.com",
"url": "http://www.uifx.com",
"summary": "Experienced technical leader, team manager, and consultant. Expert at building web applications and websites for desktop and mobile devices and backend API development with cloud technology.",
"location": {
File/Page HTML Before HTML After HTML Diff JS Before JS After JS Diff Overall Diff
results (2081 ms) 17.1 kB 22.4 kB +5.3kB 235 kB 214 kB -21kB -15.7kB (6% smaller)
First Load JS shared by all 208 kB 147kB -61kB 29% smaller!
├ chunks/framework-.js 46.5 kB 46.5 kB
├ chunks/main-.js 28.4 kB 28.4 kB
├ chunks/pages/_app-.js 131 kB 69.7kB -61.3 kB 46% smaller!
├ chunks/webpack-.js 2.21 kB 2.21 kB
└ css/f1f864.css 8.19 kB 4.01 kB
Command Before (Avg sec) After (Avg sec) Difference
`test:ci` no cache (CI situation) 14.619 13.83 5.4% faster
`test:ci` with cache 13.164 12.652 3.9% faster
@uglow
uglow / interactive-drawio.svg
Last active August 31, 2018 06:45
Example of using script within SVG. Based on info from http://www.petercollingridge.co.uk/tutorials/svg/interactive/javascript/ and my own DrawIO SVG hacking (as DrawIO's SVG support is barely functional). Working version:https://rawgit.com/uglow/60ea0ec165ac4426e40c9174569cabcf/raw/3e880520260f56e73ec3bf5ab9f0399b6dfa4541/interactive-drawio.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@uglow
uglow / drawio-svg.js
Last active August 31, 2018 05:59
DrawIO SVG Filter Button script
//<![CDATA[
// This script is designed to be imported by an SVG file created by DrawIO.
// While we wait for DrawIO to export layers and groups correctly for SVGs,
// this is a hacky way to add filter buttons to filter shapes based on their stroke or fill.
//
// It basically works by looking for nodes with the background colour #abcdef. These nodes represent toggle buttons.
//
// Need to request this gist via rawgit.com (see https://stackoverflow.com/questions/17341122/link-and-execute-external-javascript-file-hosted-on-github)
@uglow
uglow / hiring.md
Last active November 10, 2021 00:36
Hiring process for software engineers working with web technology

Web & API Hiring process

This document outlines the process for hiring a software engineer who will be working on developing user interfaces for the web-platform and/or developing APIs.

General approach

  1. Introduce ourselves and set expectations that tech interview will take 30 - 90 mins with the aim to find out where candidate is strong and where they are weak (3 min)
  2. Introduce company - what we do, clients, working environment, practices (3 min)
  3. Ask what they are passionate about, things they are proud of in their career so far, how do they learn new things, presentations they've made, blog articles (etc) (6 min)
importScripts('workbox-sw.prod.v1.3.0.js');
const workbox = new WorkboxSW();
const cacheFirstStrategy = workbox.strategies.cacheFirst();
const networkFirstStrategy = workbox.strategies.networkFirst({networkTimeoutSeconds: 10});
// Go to the network first for APIs, then to the cache
workbox.router.registerRoute('http*://*/api/*', networkFirstStrategy, 'GET');
// Cache the external fonts
export default class MyComponent {
constructor($http, $timeout, $location) { ... }
lookupAddress() {
$http(...).then(() => {
$location.url('somewhere');
});
}
}
import moduleUnderTest from './myComponent.js';
describe('myComponent', () => {
let component;
beforeEach(() => {
angular.mock.module(moduleUnderTest);
angular.mock.inject((myComponent) => {
component = myComponent;
import angular from 'angular';
import myServiceMod from './myService';
const mod = angular.module('company.module.component', [myServiceMod]);
// The wiring of the component is INSIDE this file.
// The dependencies are explicit (yet still injectable)
// The component can be re-used easily!
mod.component('myComponent', {
bindings: {...},