Skip to content

Instantly share code, notes, and snippets.

Tim Akinbo takinbo

Block or report user

Report or block takinbo

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@takinbo
takinbo / paginated_collection.js
Created Jul 25, 2011 — forked from io41/paginated_collection.js
Pagination with Backbone.js & django-tastypie
View paginated_collection.js
// includes bindings for fetching/fetched
var PaginatedCollection = Backbone.Collection.extend({
initialize: function() {
_.bindAll(this, 'parse', 'url', 'pageInfo', 'nextPage', 'previousPage', 'filtrate', 'sort_by');
typeof(options) != 'undefined' || (options = {});
typeof(this.limit) != 'undefined' || (this.limit = 20);
typeof(this.offset) != 'undefined' || (this.offset = 0);
typeof(this.filter_options) != 'undefined' || (this.filter_options = {});
typeof(this.sort_field) != 'undefined' || (this.sort_field = '');
@takinbo
takinbo / 584802.hex
Created Jul 10, 2019
Invalid Block #584802
View 584802.hex
00004020f1f9b8c77a42e502101978707f5de1896176ac1f3b251b0000000000000000007f5a9b94bc04c945693178e32eeae20f5066d7cde08c72001bdd5842da314a7aadf7255d9b0d1f1700e4a56d01010000000001010000000000000000000000000000000000000000000000000000000000000000ffffffff550362ec081c4d696e656420627920416e74506f6f6c313132ee003300200f0c9c50fabe6d6dc0ba0d6922d0606afa6321ef35c91f070cb29a0425d4ffef18f70658908db8b6040000000000000033060000b43f0000ffffffff02037f114f000000001976a914edf10a7fac6b32e24daa5305c723f3de58db1bc888ac0000000000000000266a24aa21a9ede2f61c3f71d1defd3fa999dfa36953755c690689799962b48bebd836974e8cf90120000000000000000000000000000000000000000000000000000000000000000000000000
@takinbo
takinbo / explorer.conf
Created Jul 9, 2019
sample nginx configuration for blockstream esplora
View explorer.conf
server {
listen 80;
server_name explorer.local;
location ~ ^/api(/?)(.*) {
proxy_pass http://127.0.0.1:4000/$2;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
@takinbo
takinbo / nbxplorer.env
Created Mar 23, 2019
nbxplorer environment file
View nbxplorer.env
NBXPLORER_NETWORK=mainnet
NBXPLORER_BIND=127.0.0.1:24444
NBXPLORER_NOAUTH=1
NBXPLORER_CHAINS=btc
NBXPLORER_BTCRPCURL=http://127.0.0.1:8332/
NBXPLORER_BTCNODEENDPOINT=127.0.0.1:8333
NBXPLORER_BTCRPCAUTH=rpcuser:rpcpassword
@takinbo
takinbo / docker-compose.yml
Created Mar 23, 2019
docker-compose.yml file for NBXplorer
View docker-compose.yml
version: "3"
services:
nbxplorer:
restart: always
build:
context: https://github.com/dgarage/NBXplorer.git#v2.0.0.21
dockerfile: Dockerfile.linuxamd64
env_file: nbxplorer.env
network_mode: host
@takinbo
takinbo / 70-hwrng.rules
Created May 31, 2018
udev rules for the ElectroDoodle TRNG-N1
View 70-hwrng.rules
# 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 / lnd-python-client.md
Created Jan 29, 2017
Writing a Python gRPC client for the Lightning Network Daemon
View lnd-python-client.md

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
@takinbo
takinbo / stream.js
Created Feb 20, 2017
stream trading events from Luno.com
View stream.js
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());
View keypress_nav.js
// 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) {
View onename.io
Verifying that +takinbo is my blockchain ID. https://onename.com/takinbo
You can’t perform that action at this time.