Skip to content

Instantly share code, notes, and snippets.

@tlrobinson
tlrobinson / geiger.ino
Last active September 12, 2019 20:11
MightyOhm Geiger Counter Kit + ESP8266 (WEMOS D1 mini) https://mightyohm.com/blog/products/geiger-counter/
// get config.h from Adafruit IO example sketch and fill in your details
#include "config.h"
#include <Pins_Arduino.h>
#include <SoftwareSerial.h>
#include <Regexp.h>
AdafruitIO_Feed *cpm_feed = io.feed("Geiger CPM");
AdafruitIO_Feed *cps_feed = io.feed("Geiger CPS");
AdafruitIO_Feed *usv_feed = io.feed("Geiger uSv/hr");
@tlrobinson
tlrobinson / bbs.sh
Last active April 14, 2021 13:56
ham radio / amateur radio setup notes for mac and raspberry pi
#!/usr/bin/env bash
# e.x.
#
# bbs.sh KE6JJJ-1 1200 145090000
# bbs.sh KE6JJJ-1 9600 433370000
#
set -eu
@tlrobinson
tlrobinson / docker-logs-all
Last active August 29, 2015 14:02
CLI: tail all Docker processes' logs with pretty colored labels and timestamps, using Foreman
#!/usr/bin/env bash
docker inspect --format='{{.Name}}' $(docker ps -q | xargs) | \
sed 's/[^a-zA-Z0-9-]//' | \
awk '{ printf "%s: docker logs -f %s\n", $1, $1 }' | \
foreman start -f /dev/stdin
@jexp
jexp / load-csv.txt
Created March 27, 2014 07:44
Import Webinar Files
//Loading CSV with Nodes
load csv with headers from
“file:/Users/rvanbruggen/Cloud/Neo Technology/Demo/DEMO-2.1.0-M01/IMPORT/INPUT/nodes.csv”
as nodes
create (n {id: nodes.Node, name: nodes.Name, type: nodes.Label})
//Loading CSV with Rels
load csv with headers from
“file:/Users/rvanbruggen/Cloud/Neo Technology/Demo/DEMO-2.1.0-M01/IMPORT/INPUT/rels.csv”
as rels
@ragingwind
ragingwind / Backend Architectures Keywords and References.md
Last active April 17, 2024 10:51
Backend Architectures Keywords and References
@gavinandresen
gavinandresen / btcpayments.rst
Last active March 28, 2021 06:40
Bitcoin Payment Messages

SEE BIP 70

See https://en.bitcoin.it/wiki/BIP_0070 for the latest version of this document; I'll keep this document so the process of discussion/revision isn't lost.

Bitcoin Payment Messages

This document proposes protocol buffer-based formats for a simple payment protocol between a customer's bitcoin client software and a merchant.

@tlrobinson
tlrobinson / example.txt
Created November 2, 2012 01:56
A REPL that waits for (Promises/A) promises to be resolved before printing.
tlrobinson ~/tmp $ node promise-repl.js
q> require("q-fs").read("promise-repl.js")
<Buffer 0a 76 61 72 20 56 4d 20 3d 20 72 65 71 75 69 72 65 28 22 76 6d 22 29 3b 0a 76 61 72 20 52 45 50 4c 20 3d 20 72 65 71 75 69 72 65 28 22 72 65 70 6c 22 29 ...>
q>
@domenic
domenic / promises.md
Last active March 31, 2024 14:07
You're Missing the Point of Promises

This article has been given a more permanent home on my blog. Also, since it was first written, the development of the Promises/A+ specification has made the original emphasis on Promises/A seem somewhat outdated.

You're Missing the Point of Promises

Promises are a software abstraction that makes working with asynchronous operations much more pleasant. In the most basic definition, your code will move from continuation-passing style:

getTweetsFor("domenic", function (err, results) {
 // the rest of your code goes here.
@bhenerey
bhenerey / ideal ops.md
Created May 23, 2012 19:40
ideal ops checklist

In a perfect world, where things are done well, not just quickly, I would expect to find the following when joining the company:

Documentation

  • Accurate / up-to-date systems architecture diagram

  • Accurate / up-to-date network diagram

  • Out-of-hours support plan

  • Incident management plan

@tlrobinson
tlrobinson / storage-decorators.js
Created November 2, 2011 18:12
Example localStorage decorators
// Storage decorator base class
function StorageDecorator(storage) {
this._storage = storage;
}
StorageDecorator.prototype.getItem = function(key) {
return this._storage.getItem(key);
}
StorageDecorator.prototype.setItem = function(key, value) {
return this._storage.setItem(key, value);