I hereby claim:
- I am cgreening on github.
- I am cgreening (https://keybase.io/cgreening) on keybase.
- I have a public key ASAnNcQOiE7PnIxD4lC--Hns4IZetQSvsWxYvzoktWWSmAo
To claim this, I am signing this object:
import fs from "fs"; | |
import Heap from "heap-js"; | |
function parseData(filename: string) { | |
return fs | |
.readFileSync(filename, "utf8") | |
.split("\n") | |
.filter((line) => line.length > 0) | |
.map((line) => line.split("").map((c) => parseInt(c, 10))); | |
} |
import fs from "fs"; | |
function parseData(filename: string) { | |
const lines = fs | |
.readFileSync(filename, "utf8") | |
.split("\n") | |
.filter((line) => line.length > 0); | |
const template = lines.shift()!; |
# See here for details - https://youtu.be/Sfr0OQuZbA4 | |
# Make sure the image magick tools are in the path | |
export PATH=/usr/local/bin/:$PATH | |
# iterate through each file - make sure you selected: Pass Input "As Arguments" | |
for f in "$@" | |
do | |
# use mogrify to convert to JPEG - change to PNG for PNG conversion | |
mogrify -format jpeg "$f" | |
done |
import { X_OK } from "constants"; | |
import { isAccessor } from "typescript"; | |
class CubeSpace { | |
activeCount = 0; | |
potentiallyActive: { | |
[key: number]: { x: number; y: number; z: number; w: number }; | |
} = {}; | |
memory = new Set<number>(); | |
getKey(x: number, y: number, z: number, w: number) { |
function day15_part2(numbers: number[]) { | |
const cache = new Array<{ lastSpoken: number; previousSpoken: number }>( | |
30000000 | |
); | |
function computeNewNumber(spoken: number) { | |
const turnSpoken = cache[spoken]; | |
// first time spoken | |
if ( | |
!turnSpoken || |
#!/usr/bin/env ruby | |
# Script to generate PDF cards suitable for planning poker | |
# from Pivotal Tracker [http://www.pivotaltracker.com/] CSV export. | |
# Inspired by Bryan Helmkamp's http://github.com/brynary/features2cards/ | |
# Example output: http://img.skitch.com/20100522-d1kkhfu6yub7gpye97ikfuubi2.png | |
require 'rubygems' |
I hereby claim:
To claim this, I am signing this object:
<html> | |
<head> | |
</head> | |
<body> | |
<script src='https://code.jquery.com/jquery-2.1.3.min.js'></script> | |
<script src='https://www.nodule.io/js/nodule.151851370efa27253700.js'></script> | |
<script language='javascript'> | |
console.log('Using nodule version', nodule.version); | |
// connect to nodule |
profile.services[SERVICE_UUID].characteristics[CHARACTERISTIC_UUID].on('read', function(value) { | |
console.log('New value', value); | |
}); | |
profile.services[SERVICE_UUID].characteristics[CHARACTERISTIC_UUID].setNotifyState(true); |
profile.services[SERVICE_UUID].characteristics[CHARACTERISTIC_UUID].on('read', function(value) { | |
console.log('New value', value); | |
}); | |
profile.services[SERVICE_UUID].characteristics[CHARACTERISTIC_UUID].read(); |