Skip to content

Instantly share code, notes, and snippets.

Avatar

Norman nkoehring

View GitHub Profile
View keys.pub
BEGIN MESSAGE.
DvulbW4XHp4doue cJM1wKBngb2eGS3 aHtaXLjSISR9sRt ua2dFonEwPqcJix
PuenAVnBKI6oE2D tCgYmYCWCp3TCKq 6Xr2MZHgg6Sb2G9 VqiaieF3afW7cJm
ZuFHOD7yIQBjXYg mLf51D1neUSEdVD tVGdePSM2SLKHSg bJNp86NOX3hugD9
01EWZXiUvKWwjBs omChn3NxWaZndqW KnDvk29HFxl.
END MESSAGE.
View sub.js
function sub () {
const subs = Object.values(arguments)
return subs.reduce((acc, v) => acc - v, subs.shift())
}
const a = sub(9); // a should be 9
const b = sub(9, 4); // b should be 5
const c = sub(14, 2, 6); // c should be 6
console.log({a, b, c})
View cVimrc
" Settings
set nosmoothscroll
set noautofocus " The opposite of autofocus; this setting stops
" sites from focusing on an input box when they load
set typelinkhints
let searchlimit = 30
let scrollstep = 70
let barposition = "bottom"
let hintchars = hjklasdfgyuiopqwertnmzxcvb
set scalehints
@nkoehring
nkoehring / blockstack.verification
Created Feb 23, 2017
Verifying that "koehrr.id" is my Blockstack ID. https://onename.com/koehrr
View blockstack.verification
Verifying that "koehrr.id" is my Blockstack ID. https://onename.com/koehrr
@nkoehring
nkoehring / numbers.cpp
Last active Jun 5, 2016
read line delimited floating numbers from a file
View numbers.cpp
#include <iostream>
#include <fstream>
#include <stdlib.h>
using namespace std;
int main ()
{
double arr[5];
string tmp;
int i = 0;
View csv2json.js
var csv = require("node-csv").createParser()
csv.parseFile('./test/mikko.csv', (err, data) => {
var result = {}
var keys = data[0].slice(1)
var data = data.slice(1)
var obj
View isso_error.txt
Traceback (most recent call last):
File "/usr/bin/isso", line 9, in <module>
load_entry_point('isso==0.9.10', 'console_scripts', 'isso')()
File "/usr/lib/python3.5/site-packages/isso/__init__.py", line 259, in main
from gevent.pywsgi import WSGIServer
File "/usr/lib/python3.5/site-packages/gevent/__init__.py", line 41, in <module>
from gevent.hub import get_hub, iwait, wait
File "/usr/lib/python3.5/site-packages/gevent/hub.py", line 289
except Exception, ex:
^
View keybase.md

Keybase proof

I hereby claim:

  • I am nkoehring on github.
  • I am koehr (https://keybase.io/koehr) on keybase.
  • I have a public key ASDPasu6nAlqAUbMaT0ob__xkvsskGNKgVVkoLnbfHu2aAo

To claim this, I am signing this object:

View psy.zsh-theme
# pSy's zshell prompt
# zsh theme requires 256 color enabled terminal
# based on sporty_256 and fishy
_collapsed_path() {
#TODO: collapse path elements until the path is short enough
#TODO eg: "/foo/bar/baz/quux/quarz" becomes "/f/b/baz/quux/quarz" if it still fits
#TODO or "/f/b/b/q/quarz" in the 2nd shortest form, "quarz" in the shortest
# http://lavica.fesb.hr/cgi-bin/info2html?(zsh)The%20zsh/pcre%20Module
View jarvis.c
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
struct Point {
int x;
int y;
struct Point *next;
};
You can’t perform that action at this time.