Skip to content

Instantly share code, notes, and snippets.

@e-e-e
e-e-e / vis_reg_talk.md
Last active November 10, 2020 14:41
Reaktor Automated Testing Showcase II Presentation

visual regression testing

This is just a quick FYI kind of talk. Not a deep dive.


Overview of testing

  • unit tests
@e-e-e
e-e-e / cypress_talk.md
Last active November 10, 2020 14:41
Reaktor Automated Testing Showcase Presentation

When, why, cypress

What is Cypress

Cypress is a web automation tool to help ensure that our Web UIs act as we expect. A tool in the belt to help us deploy our applications with confidence. As an aside - in any talk about testing - I want to stress the aim is for confidence not coverage.


@e-e-e
e-e-e / memoize.ts
Created October 17, 2018 05:18
Memoize typescript
const defaultMemoizeResolver = (...args: any[]) => args[0] ? args[0].toString() : 'undefined';
interface MemoizedFunction<T> {
(...args: any[]): T;
clearCache?(): void;
}
function memoize<T>(func: (...args: any[]) => T, resolver?: (...args: any[]) => string): MemoizedFunction<T> {
const cache = new Map<string, T>();
const memo = function (...args: any[]) {
const key = resolver ? resolver(...args) : defaultMemoizeResolver(...args);
if (cache.has(key)) {
echo "{ \"extends\": [\"standard\"]}" > .eslintrc
@e-e-e
e-e-e / restart_bluetooth.sh
Created July 23, 2018 12:49 — forked from nicolasembleton/restart_bluetooth.sh
Restart Bluetooth Daemon on Mac OS X without restarting
#!/bin/bash
sudo kextunload -b com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport
sudo kextload -b com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport
@e-e-e
e-e-e / notes.md
Created July 22, 2018 07:41
Zotero -> Hyper Readings -> Zotero
@e-e-e
e-e-e / README.md
Last active December 15, 2017 00:27
AWS SSM import and export helpers
AWS_PROFILE=oldEnv node exportSSM.js

This makes a file called ssm.data which is just newline json data. Which is piped by the following command into the new AWS SSM environment.

AWS_PROFILE=newEnv node importSSM.js
@e-e-e
e-e-e / .gitconfig
Last active October 18, 2017 00:24
my git alias config
[alias]
a = add
b = branch
c = commit
d = diff
f = fetch
l = log
m = merge
co = checkout
@e-e-e
e-e-e / BluetoothRestart
Created September 22, 2017 14:57 — forked from ajmaradiaga/BluetoothRestart
Force Bluetooth Restart on Mac
sudo launchctl unload /System/Library/LaunchDaemons/com.apple.blued.plist
sudo launchctl load /System/Library/LaunchDaemons/com.apple.blued.plist
<snippet>
<content><![CDATA[() => {${1:}$SELECTION${0}}]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>()</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<scope>text.plain, source.js</scope>
</snippet>