Skip to content

Instantly share code, notes, and snippets.

View danrubins's full-sized avatar

Dan Rubins danrubins

View GitHub Profile
@danrubins
danrubins / dom0-mouse.txt
Last active March 19, 2021 22:01
qubes-usb-evtest
Input device ID: bus 0x3 vendor 0x93a product 0x2510 version 0x111
Input device name: "PixArt USB Optical Mouse"
Supported events:
Event type 0 (EV_SYN)
Event type 1 (EV_KEY)
Event code 272 (BTN_LEFT)
Event code 273 (BTN_RIGHT)
Event code 274 (BTN_MIDDLE)
Event type 2 (EV_REL)
Event code 0 (REL_X)
@danrubins
danrubins / README.md
Created October 24, 2019 01:34 — forked from notwaldorf/README.md
ServiceWorker code to cache Tensorflow model shards.

ServiceWorker code to cache TensorFlow model shards.

One of the problems I have when testing giant TensorFlow models in TensorFlow.js is that they're huge (like 500 MB) and they take forever to download, every time I refresh the page. This is how I setup my ServiceWorker code so that at least in testing I only have to download the model once, and then it's saved in the cache for the next time.

@danrubins
danrubins / README.md
Last active December 20, 2020 02:05
Legal Robot's options for helmet.js

Security Headers at Legal Robot

We're big fans of open source software at Legal Robot. We also know that getting security right is a tough job, so we want to share some of the useful tools we use to build and run Legal Robot and keep it secure.

We are also proud to run Legal Robot on the Meteor framework for Node.js. With this recent change, Helmet.js becomes the official recommendation for security headers in Meteor, replacing the previous Meteor browser-policy package.

One of the most helpful tools in our Meteor security toolbox at Legal Robot is Content Security Policy (CSP)  — basically, our server tells the browser what code it is allowed to run and how to handle something like code injection from a malicious browser extension.

CSP can be quite tricky, but there are some excellent tools out there to help, like [Google'

Keybase proof

I hereby claim:

  • I am dhrubins on github.
  • I am danrubins (https://keybase.io/danrubins) on keybase.
  • I have a public key ASAkZA0qGudjtrRzreU9qWC_ukHTeazgdA1sx3t5wqEveAo

To claim this, I am signing this object: