Skip to content

Instantly share code, notes, and snippets.

View nkcmr's full-sized avatar

nick comer nkcmr

View GitHub Profile
@nkcmr
nkcmr / goto.sh
Last active March 6, 2019 15:54
goto.sh
#!/bin/bash
goto() {
# create the shortcuts dir if necessary
if [ ! -d "$HOME/.shortcuts" ] ; then
mkdir -p "$HOME/.shortcuts"
fi
if [[ "$1" == "--list" ]] ; then
for f in "$HOME/.shortcuts/"* ; do
echo "$(basename "$f") -> $(tr -d '\n' < "$f")"
package main
import (
"fmt"
"io/ioutil"
"math"
"os"
"strconv"
"strings"
"text/template"

Keybase proof

I hereby claim:

  • I am nkcmr on github.
  • I am nkcmr (https://keybase.io/nkcmr) on keybase.
  • I have a public key whose fingerprint is BBCA B79B BD4A 436E DA81 E4CF DD79 7F0B 1769 BCA1

To claim this, I am signing this object:

@nkcmr
nkcmr / authr-rule.json
Last active May 11, 2018 19:32
JSON schema for authr rules as of authr-v1.1.1
{
"type": "object",
"additionalProperties": false,
"required": [
"access",
"where"
],
"properties": {
"access": {
"type": "string",
@nkcmr
nkcmr / keybase.md
Created April 21, 2018 19:38
keybase.md

Keybase proof

I hereby claim:

  • I am nkcmr on github.
  • I am nkcmr (https://keybase.io/nkcmr) on keybase.
  • I have a public key whose fingerprint is 82D8 9697 B0E4 8E64 4E78 259A 1423 50B6 4205 77DE

To claim this, I am signing this object:

@nkcmr
nkcmr / main.go
Created June 11, 2017 18:37
a concurrent network diagnostic tool of sorts
package main
import (
// "io/ioutil"
"bytes"
"encoding/json"
"fmt"
"io"
"os"
"os/exec"
@nkcmr
nkcmr / README.md
Last active April 23, 2017 10:18
simple deluge complete scope that uploads stuff to google drive

deluge to google drive uploader

simple uploader script for deluge, assign this script to be called on torrent complete and it will walk a directory and upload it to your google drive

install dependencies:

npm install googleapis async winston lodash mime twilio
@nkcmr
nkcmr / ad-tracker-block.js
Last active August 10, 2016 20:27
ad/tracker blocker that works at a system level
'use strict'
const blacklist = [
/analytics/,
/fullstory/,
/amplitude/,
/crashlytics\.com/,
/doubleclick\.net/,
/chartbeat\.(net|com)/,
/deepintent\.com/,
@nkcmr
nkcmr / bmrk.php
Created August 10, 2016 13:06
poor man's php benchmark
<?php
define("BENCH_ITERATIONS", 1000);
$scenarios = [];
// scenario one
$scenarios['one'] = function () {
$start = microtime(true);
// do stuff in between the microtimes
return microtime(true) - $start;

Keybase proof

I hereby claim:

  • I am nkcmr on github.
  • I am nkcmr (https://keybase.io/nkcmr) on keybase.
  • I have a public key ASBCQWHPkNbeLwUL7moC-LL6vSSGgGzDRtkFuR6covWMXQo

To claim this, I am signing this object: