Skip to content

Instantly share code, notes, and snippets.

Jim Montgomery jimmont

Block or report user

Report or block jimmont

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
mohakshah /
Last active Jan 24, 2020
Builing ZFS on Raspberry Pi 3 running Rasbpian


This is a tutorial for building and installing the latest release version (0.7.3 as of writing) of "ZFS on Linux" on a Raspberry Pi 3 running Raspbian Stretch. Specifically, we'll be building the dkms version of ZoL, which saves you the hassle of re-compiling the kernel modules after every kernel update. Even though ZoL added support for building dkms packages for debian in version 0.7.3, the build process on a Raspberry Pi 3 is not quite straight-forward. Hopefully, these instructions will make it easier.


  1. Install the build dependencies.
$ sudo apt-get update
$ sudo apt-get install build-essential autoconf libtool gawk alien fakeroot
$ sudo apt-get install dkms zlib1g-dev uuid-dev libattr1-dev libblkid-dev libselinux-dev libudev-dev libssl-dev parted lsscsi wget ksh
ziluvatar / token-generator.js
Last active Feb 4, 2020
Example of refreshing tokens with jwt
View token-generator.js
* Example to refresh tokens using
* It was requested to be introduced at as part of the jsonwebtoken library,
* since we feel it does not add too much value but it will add code to mantain
* we won't include it.
* I create this gist just to help those who want to auto-refresh JWTs.
const jwt = require('jsonwebtoken');
brianherman /
Last active Jun 15, 2018
Debian Jessie and mssql-server

Download mssql from the microsoft website.


dpkg -i mssql-server_14.0.1.246-6_amd64.deb 

The next command will install dependancies.

sudo apt-get -f install 
indrayam /
Last active Feb 19, 2020
Create JWT Token Header Using Unix Command line tools ONLY!


Y = Base64URLEncode(Header) + ‘.’ + Base64URLEncode(Payload)
JWT = Y + ‘.’ + Base64URLEncode(HMACSHA256(Y))

The steps called out here should work on a Mac as well. The only thing that might be different is the sed command used below. Instead of using -E, you will have to use -r to run sed with extended regular expression support

Use data from this tutorial:

jkullick /
Last active Oct 19, 2017
Generate .htpasswd with OpenSSL
printf "$USER:$(openssl passwd -crypt $PASSWORD)\n" >> .htpasswd
sultanqasim /
Created Jun 21, 2016
ZRAM config for Raspberry Pi 3
# Raspberry Pi ZRAM script
# Tuned for quad core, 1 GB RAM models
# put me in /etc/init.d/ and make me executable
# then run "sudo update-rc.d defaults"
modprobe zram
echo 3 >/sys/devices/virtual/block/zram0/max_comp_streams
echo lz4 >/sys/devices/virtual/block/zram0/comp_algorithm
formigarafa /
Last active Mar 15, 2017
Basic to get google dns over https working.
ebidel / mo_vs.proxy.js
Last active Feb 28, 2019
MutationObserver vs. Proxy to detect .textContent changes
View mo_vs.proxy.js
This demo shows two ways to detect changes to a DOM node `.textContent`, one
using a `MutationObserver` and the other using an ES2015 `Proxy`.
From testing, a `Proxy` appears to be 6-8x faster than using a MO in Chrome 50.
**Update**: removing the `Proxy` altogether speeds up the MO to be inline with the Proxy.
This has something to do with how the browser queues/prioritizes Proxies over MO.
spiralx / computed-property.js
Created Jan 26, 2016
Use ES6 Proxy to attach computed properties
View computed-property.js
'use strict';
const VALUE = Symbol.for('value')
function addComputedProperty(obj, name, func) {
let _computed = func(obj)
return new Proxy(obj, {
get(target, key, receiver) {
if (key === name) {
paulmillr /
Created Dec 22, 2015
Turn off spy cams in airbnb rentals
# Detect and Disconnect the DropCam and Withings devices some people are using to
# spy on guests in their home, especially in AirBnB rentals. Based on
# This script was named by Adam Harvey (, who also
You can’t perform that action at this time.