Skip to content

Instantly share code, notes, and snippets.

@tylerdmace
tylerdmace / options.md
Created April 6, 2023 13:48
Documentation Options
@tylerdmace
tylerdmace / 60-vaulte-webusb.rules
Created July 27, 2021 05:30
udev rules for the Vault E
SUBSYSTEM=="usb", ATTR{idVendor}=="1209", ATTR{idProduct}=="53c1", TAG+="uaccess"
@tylerdmace
tylerdmace / keybase.md
Last active September 6, 2019 03:33
keybase.io

Keybase proof

I hereby claim:

  • I am tylerdmace on github.
  • I am tylerdmace (https://keybase.io/tylerdmace) on keybase.
  • I have a public key whose fingerprint is 530C BF29 D5FA C87F F9F0 D675 A1FF C912 6916 46DA

To claim this, I am signing this object:

@tylerdmace
tylerdmace / nilify.go
Last active October 17, 2018 17:47
Error nilification in Go
package main
import (
"errors"
"fmt"
)
func main() {
err := test()
@tylerdmace
tylerdmace / example.js
Last active August 29, 2015 14:25
{{::bindOnce}}
'use strict';
module.exports = function(ngModule) {
ngModule.directive('myDirective', [function() {
var elementId = 0;
return {
restrict: 'E',
scope: {
@tylerdmace
tylerdmace / example.js
Created July 20, 2015 11:54
Promises & D3
node.append('text')
.attr('text-anchor', 'middle')
.attr('dominant-baseline', 'central')
.style('font-family','FontAwesome')
.style('font-size','24px')
.text(getIcon)
.style('fill', function (d) {
return color(d.group);
});
@tylerdmace
tylerdmace / value-check.js
Created May 27, 2015 21:58
Tree Traversal (Check to see if all values are the same)
var tree = {
a: 1,
b: 1,
c: 1,
d: {
d1: 1,
d2: 1,
d3: 1
},
e: 1,
@tylerdmace
tylerdmace / tripleThreat.js
Created May 18, 2015 00:15
Test 2: Triple Threat
var assert = require('assert');
/********************************
* Return true if the array contains, somewhere, three increasing
* adjacent numbers like .... 4, 5, 6, ... or 23, 24, 25.
*
* See the asserts below for examples of input
* and expected output.
*
* If you have node installed, all you need to do to test
@tylerdmace
tylerdmace / skittles.js
Created May 18, 2015 00:14
Test 1: Skittles
var assert = require('assert');
/********************************
* We want make a package of goal kilos of skittles. We have
* inventory of small bags (1 kilos each) and big bags (5 kilos each).
* Return the number of small bags to use, assuming we always
* use big bags before small bags. Return -1 if it can't be done.
*
* See the asserts below for examples of input
* and expected output.