Skip to content

Instantly share code, notes, and snippets.

View takinbo's full-sized avatar

Tim Akinbo takinbo

View GitHub Profile
@takinbo
takinbo / 70-hwrng.rules
Created May 31, 2018 21:12
udev rules for the ElectroDoodle TRNG-N1
# ElectroDoodle TRNG-N1 │ rgb_bitdist| 2| 100000| 100|0.25684952| PASSED
SUBSYSTEM=="tty", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="5740", SYMLINK+="hwrng", RUN+="/usr/bin/stty -F /dev/%k 115200 raw", T│ rgb_bitdist| 3| 100000| 100|0.39832547| PASSED
AG+="uaccess"
@takinbo
takinbo / stream.js
Created February 20, 2017 17:53
stream trading events from Luno.com
var WebsocketClient = require('websocket').client,
colors = require('colors'),
sprintf = require('sprintf-js').sprintf;
var ws = new WebsocketClient();
var asks = bids = {};
var now = function () {
var date = new Date();
return sprintf("%02d:%02d:%02d", date.getHours(), date.getMinutes(), date.getSeconds());
@takinbo
takinbo / lnd-python-client.md
Created January 29, 2017 23:27
Writing a Python gRPC client for the Lightning Network Daemon

How to write a Python gRPC client for the Lightning Network Daemon

  • Create a virtual environment for your project
$ virtualenv lnd
  • Activate the virtual environment
$ source lnd/bin/activate
Verifying that +takinbo is my blockchain ID. https://onename.com/takinbo
{'downloader/exception_count': 1801,
'downloader/exception_type_count/twisted.internet.error.ConnectionRefusedError': 4,
'downloader/exception_type_count/twisted.internet.error.TimeoutError': 5,
'downloader/exception_type_count/twisted.web._newclient.ResponseNeverReceived': 1792,
'downloader/request_bytes': 8780679,
'downloader/request_count': 10100,
'downloader/request_method_count/GET': 2,
'downloader/request_method_count/POST': 10098,
'downloader/response_bytes': 12366649,
'downloader/response_count': 8299,
@takinbo
takinbo / kannel.conf
Created March 11, 2015 14:54
sample kannel.conf for docker image
group = core
admin-port = 13000
admin-password = ***
admin-allow-ip = "*.*.*.*"
box-allow-ip = "*.*.*.*"
smsbox-port = 13001
group = smsbox
bearerbox-host = bearerbox
sendsms-port = 13013
Verifying that +takinbo is my Bitcoin username. You can send me #bitcoin here: https://onename.io/takinbo

Keybase proof

I hereby claim:

  • I am takinbo on github.
  • I am takinbo (https://keybase.io/takinbo) on keybase.
  • I have a public key whose fingerprint is DF7F B883 8949 37A9 ABAA 27F5 AB3B B959 BC3F 6CED

To claim this, I am signing this object:

@takinbo
takinbo / diffbot.py
Created May 19, 2012 16:05 — forked from david-torres/diffbot.py
Simple Python interface for Diffbot API
import requests
import json
class Diffbot(object):
"""
A simple Python interface for the Diffbot api.
Relies on the Requests library - python-requests.org
Usage:
@takinbo
takinbo / keypress_nav.js
Created February 25, 2012 19:28
Form Navigation
// Adds the ability to navigate text boxes while pressing either n or p
$('.bigbox2').keypress(function (e) {
switch (e.which) {
case 78:
case 110:
// N was pressed
el = $(this);
prefix = el.attr('name').replace(/-.*$/, "");
pos = $('input[name|="'+prefix+'"]').index(el);
if (pos < $('input[name|="'+prefix+'"]').length) {