Skip to content

Instantly share code, notes, and snippets.

{
"$schema": "https://raw.githubusercontent.com/jsonresume/resume-schema/v1.0.0/schema.json",
"basics": {
"name": "Daniel Lewis",
"label": "Software Engineer",
"image": "",
"email": "dan@helveticascenario.dev",
"phone": "(512) 971-0073",
"url": "https://helveticascenario.dev",
"summary": "8 years in web development with a focus on UI creating CMS Platforms, I carry strong expertise in React, Redux, Typescript, CSS, and HTML. Outside of work, I enjoy programming creative applications such as game engines, experimental graphics platforms, and tools to aid in the production of electronic music with a myriad of technologies such as Rust, Max/MSP, C/C++, Javascript, Typescript, and Unity.",
@HelveticaScenario
HelveticaScenario / dbTest.js
Created July 25, 2020 03:02
Demonstation of how sharded db can reduce load
function roundRobin(count, shardCount) {
const shards = new Array(shardCount).fill(0);
function hitShard(shard, key) {
shards[shard]++;
const mod = key % shards.length;
if (mod !== shard) {
hitShard(mod, key);
}
}
let idx = 0;
@HelveticaScenario
HelveticaScenario / keysOfType.ts
Created March 12, 2020 23:16
A type alias for getting a union of keys of an interface that match a type
type MapKeys<R, T> = {
[P in keyof R]: R[P] extends T ? P : never;
};
type KeysOfType<R, T, IncludeOptional extends boolean = true> = Exclude<
MapKeys<R, IncludeOptional extends true ? T | undefined : T>[keyof R],
undefined
>;
#! /bin/bash
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list;
sudo apt-get update && sudo apt-get install yarn;
yarn --version;
class Seq {
constructor(iterable, transformerGenerator) {
this.iterable = iterable;
this.transformerGenerator = transformerGenerator;
Object.freeze(this);
}
[Symbol.iterator]() {
const cache = this.iterable[Symbol.iterator]();
const transformer = this.transformerGenerator();
let lastMouse ={
x: -1,
y: -1
}
function _init() {
cls()
}
function _draw(time) {
function _draw() {
rect(20,50,70,90)
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Game</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/7.0.0/normalize.min.css">
</head>
<body>
!function(t){function e(r){if(n[r])return n[r].exports;var u=n[r]={i:r,l:!1,exports:{}};return t[r].call(u.exports,u,u.exports,e),u.l=!0,u.exports}var n={};e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:r})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=122)}([function(t,e,n){"use strict";function r(t){return function e(n,r){switch(arguments.length){case 0:return e;case 1:return Object(c.a)(n)?e:Object(u.a)(function(e){return t(n,e)});default:return Object(c.a)(n)&&Object(c.a)(r)?e:Object(c.a)(n)?Object(u.a)(function(e){return t(e,r)}):Object(c.a)(r)?Object(u.a)(function(e){return t(n,e)}):t(n,r)}}}e.a=r;var u=n(1),c=n(27)},function(t,e,n){"use strict";function r(t){return function e(n){return 0===arguments.length||Object(u.a)(n)?e:t.apply(this,arguments)}}e.a=r;var u=n(27)},function(t,e,n){"use strict";functio

Keybase proof

I hereby claim:

  • I am helveticascenario on github.
  • I am hscenario (https://keybase.io/hscenario) on keybase.
  • I have a public key ASDg1rzH-1Ivxrp6KjnBG2XbbTx9a8AvSbzoqwfyYYWmLQo

To claim this, I am signing this object: