Skip to content

Instantly share code, notes, and snippets.


Richard Kotze rkotze

View GitHub Profile
rkotze /
Created Mar 21, 2022
Quick tips for handling multiple .ssh keys for Git repos


List ssh keys added ssh-add -L

Add private key ssh-add ~./path/to/private_key

Manual man ssh-add

rkotze /
Last active Nov 14, 2019
VS Code snippets for writing tests (Jest, Mocha)


  1. Under preferences -> user snippets select javascript.
  2. Copy & paste javascript.json contents


rkotze / reflux-superagent-sinon.spec.js
Last active Aug 5, 2019
First example on how to unit test RefluxJS and superagent with SinonJS
View reflux-superagent-sinon.spec.js
import myStore from './';
import myAction from './my.action';
import superagent from 'superagent';
import sinon from 'sinon';
import should from 'should';
import shouldSinon from 'should-sinon';
describe('Api that does stuff', () => {
let putRequest,
rkotze / detect-internet-explorer.js
Created Feb 20, 2019
Detect if Internet Explorer and return the version
View detect-internet-explorer.js
function detectIE(){
var IE = navigator.userAgent.match(/MSIE\s([0-9]+)\./);
if(IE) return parseInt(IE[1], 10);
var IE11 = navigator.userAgent.match(/Trident\/.*rv:([0-9]{1,}[\.0-9]{0,})/);
if(IE11) return parseInt(IE11[1], 10);
rkotze / detect-chrome.js
Created Feb 20, 2019
Detect if Google Chrome and return version number
View detect-chrome.js
function detectChromeVersion() {
var chrome = navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);
if(chrome) return parseInt(chrome[2], 10);

Keybase proof

I hereby claim:

  • I am rkotze on github.
  • I am rkotze ( on keybase.
  • I have a public key ASDOOddrlcNsKtPPxzZvN0LgDjRAvo7USXMLfFF1st9xNwo

To claim this, I am signing this object: