Skip to content

Instantly share code, notes, and snippets.


Tim heisian

  • Oakland, CA
View GitHub Profile
heisian / magic-mouse-2-windows-scrolling-free
Created Apr 25, 2020
Magic Mouse 2 Scrolling in Windows 10 for Free
View magic-mouse-2-windows-scrolling-free
# Magic Mouse 2 Scrolling on Windows 10
## General Notes
* There are a couple paid programs out there that will get scrolling working for your magic mouse. The most popular one asks you to buy a _subscription_ license. **No thanks*..
* There are some tutorials that suggest downloading Apple BootCamp drivers from the Apple support site. This will **not** work for the Magic Mouse 2.
View idealApi.js
import Xhr from 'Xhr'
const xhr = new Xhr()
// Or alternatively, xhr is just functional:
// import xhr from 'xhr'
// Assume xhr instance (or functional equivalent) is being passed in
;(async (xhr) => {

Fullstack Exercise (Tim)

Create a Node server/client app that communicates via

Server/Client interaction


The server should listen for connections and let any clients know, on connection, that they've successfully connected. The server should emit a success message to the client through the channel.

heisian / Dockerfile-atlantis-ecs-git-crypt
Last active Aug 30, 2019
Run Atlantis on ECS with git-crypt
View Dockerfile-atlantis-ecs-git-crypt
# This Dockerfile is intended to be uploaded to a PRIVATE repository.
# This method involves copying the git-crypt key into this image,
# which will allow one to use a custom workflow in Atlantis
# to decrypt before running init/plan/apply.
FROM runatlantis/atlantis
RUN apk --update add \

Keybase proof

I hereby claim:

  • I am heisian on github.
  • I am ethos_tim ( on keybase.
  • I have a public key ASAnDTs_vp7GA2feMPqzCVM-nyYUlh8a9tUip4gzBl6wZAo

To claim this, I am signing this object:

heisian / businessLogic.js
Created Aug 22, 2019
Coalescing imports/exports w/o Repeating Yourself (too much)
View businessLogic.js
const Redis = require('ioredis')
const services = require('./services')
const redis = new Redis()
;(() => {
const oneInstance = new services.One()
const one = oneInstance.getNumberOne()
heisian / first_run.ini
Last active Aug 2, 2019
OpenVPN Access Server w/ LetsEncrypt for Web UI
View first_run.ini
# Modified from
cert-name =
rsa-key-size = 4096
email =
domains =
agree-tos = True
# Would need to automate the process of adding a
# TXT record in Route53 for this to be automated:
View tinyWatcher.js
* Uses fs.watchFile and cluster to watch, fork, and "restart"
* the file that this code is included in. Run this code before
* anything else in the script and it will restart a persistent-
* running fork of itself when the source is modified.
const fs = require('fs')
const cluster = require('cluster')
View _no_returning.js
const { DB } = require('db')
const db = new DB()
;(async () => {
await db.connect()
await db.transaction(async (trx) => {
const user = await db.models.User.query(trx)
console.log({ user })
heisian / _returning.js
Last active Oct 19, 2018
View _returning.js
const { DB } = require('db')
const db = new DB()
;(async () => {
await db.connect()
await db.transaction(async (trx) => {
const user = await db.models.User.query(trx)