Skip to content

Instantly share code, notes, and snippets.

Avatar

Matthew Boyette Dyndrilliac

View GitHub Profile
@Dyndrilliac
Dyndrilliac / twos-complement.js
Created Mar 11, 2016 — forked from bsara/twos-complement.js
A simple function that returns the two's complement binary representation of a given number
View twos-complement.js
/**
* @param {Number} value
* @param {Number} [bitCount = 0]
*
* @returns {String} binary representation of the two's complement of `value`.
*/
function twosComplement(value, bitCount) {
let binaryStr;
if (value >= 0) {
@Dyndrilliac
Dyndrilliac / gist:a95f4b42bd4aab7ccda4
Created Mar 19, 2016 — forked from davidbalbert/gist:6815258
How to install custom SSL certificates on an ASUS RT-N66U running asuswrt-merlin
View gist:a95f4b42bd4aab7ccda4
# First, enable SSH in the Administration->System tab.
# Then log in to the device.
# Verify that https_crt_save is off
admin@RT-N66U:/tmp/home/root# nvram get https_crt_save
0
# Enable https_crt_save and verify that it was set correctly
admin@RT-N66U:/tmp/home/root# nvram set https_crt_save=1
admin@RT-N66U:/tmp/home/root# nvram get https_crt_save