Skip to content

Instantly share code, notes, and snippets.

tarkeo19teqyxv9zwz6xu0xjgpsjkvphngmnz64tpkmpw
#!/usr/bin/env python
# add rune per block
add_rune = 100000000
blocks_per_year = 6311390
blocks_per_day = 17280
total_nodes = 100
#!/usr/bin/env python
# add rune per block
add_rune = 100000000
blocks_per_year = 6311390
blocks_per_day = 17280
total_nodes = 100
@cbarraford
cbarraford / Dockerfile
Last active May 7, 2019 11:10
Hug bug in 2.5.0 where POST requests don't never return
FROM python:alpine
RUN pip3 install hug==2.5.0
WORKDIR /app
EXPOSE 5454
CMD hug -p 5454 -f /app/main.py
@cbarraford
cbarraford / token.go
Last active March 2, 2019 16:46
Timebased token creation for
package token
import (
"crypto/sha256"
"fmt"
"os"
"time"
"github.com/cbarraford/octagon-ql/store"
)
go install . ./cmd/... && coind --txindex --rpcuser=cbarraford --rpcpass=password --coin-config sample-ltc.conf
2018/10/23 15:23:12 Pre: {MainNetParams:{Name:mainnet Net:Unknown BitcoinNet (3686187259) DefaultPort:9333 DNSSeeds:[seed-a.litecoin.loshan.co.uk dnsseed.thrasher.io dnsseed.litecointools.com dnsseed.litecoinpool.org dnsseed.koin-project.com] GenesisBlock:0x1c84620 GenesisHash:12a765e31ffd4059bada1e25190f6e98c99d9714d334efa41a195a7e7e04bfe2 PowLimit:+110427836236357352041769395878404723568785424659630784333489133269811200 PowLimitBits:504365055 BIP0034Height:710000 BIP0065Height:918684 BIP0066Height:811879 CoinbaseMaturity:100 SubsidyReductionInterval:840000 TargetTimespan:84h0m0s TargetTimePerBlock:2m30s RetargetAdjustmentFactor:4 ReduceMinDifficulty:false MinDiffReductionTime:0s GenerateSupported:false Checkpoints:[{Height:1500 Hash:841a2965955dd288cfa707a755d05a54e45f8bd476835ec9af4402a2b59a2967} {Height:4032 Hash:9ce90e427198fc0ef05e5905ce3503725b80e26afd35a987965fd7e3d9cf0846} {Height:8064 Hash
ESC[34mINFOESC[0m[18390] POST /containers/e26f8bcea84b841ee1b9e3cadb747510c74a2b1bc04192595d8c17fcf7e60a26/start
ESC[34mINFOESC[0m[18390] +job start(e26f8bcea84b841ee1b9e3cadb747510c74a2b1bc04192595d8c17fcf7e60a26)
ESC[34mINFOESC[0m[18390] +job allocate_interface(e26f8bcea84b841ee1b9e3cadb747510c74a2b1bc04192595d8c17fcf7e60a26)
ESC[34mINFOESC[0m[18390] -job allocate_interface(e26f8bcea84b841ee1b9e3cadb747510c74a2b1bc04192595d8c17fcf7e60a26) = OK (0)
ESC[34mINFOESC[0m[18390] +job allocate_port(e26f8bcea84b841ee1b9e3cadb747510c74a2b1bc04192595d8c17fcf7e60a26)
ESC[34mDEBUESC[0m[18390] /sbin/iptables, [-t nat -A DOCKER -p tcp -d 0/0 --dport 49388 ! -i docker0 -j DNAT --to-destination 172.17.0.2
25:3838]
ESC[34mDEBUESC[0m[18390] /sbin/iptables, [-I FORWARD ! -i docker0 -o docker0 -p tcp -d 172.17.0.225 --dport 3838 -j ACCEPT]
ESC[34mDEBUESC[0m[18390] /sbin/iptables, [-t nat -D DOCKER -p tcp -d 0/0 --dport 49388 ! -i docker0 -j DNAT --to-destination 172.17.0.2
25:3838]
ESC[34mINFOESC[0m[5551] GET /containers/5e2b1c1292e209d4f74827c3f5d3980ea9f379c90dfd5eee68fabebabba47a3d/json
ESC[34mINFOESC[0m[5551] +job container_inspect(5e2b1c1292e209d4f74827c3f5d3980ea9f379c90dfd5eee68fabebabba47a3d)
ESC[34mINFOESC[0m[5551] -job container_inspect(5e2b1c1292e209d4f74827c3f5d3980ea9f379c90dfd5eee68fabebabba47a3d) = OK (0)
ESC[34mDEBUESC[0m[5551] Calling GET /containers/{name:.*}/json
ESC[34mINFOESC[0m[5551] GET /containers/b5d1207ff08894e8c7e2e5a183f952dcec281afe2ff7b8b6d8443cccde761ad6/json
ESC[34mINFOESC[0m[5551] +job container_inspect(b5d1207ff08894e8c7e2e5a183f952dcec281afe2ff7b8b6d8443cccde761ad6)
ESC[34mINFOESC[0m[5551] -job container_inspect(b5d1207ff08894e8c7e2e5a183f952dcec281afe2ff7b8b6d8443cccde761ad6) = OK (0)
ESC[34mDEBUESC[0m[5551] Calling GET /containers/{name:.*}/json
ESC[34mINFOESC[0m[5551] GET /containers/container-75388/json
ESC[34mINFOESC[0m[5551] +job container_inspect(container-75388)
Celebrity, and only the celebrity, meets these criteria:
- celebrity does not know anyone at the party
- everyone at the party knows the celebrity
knows(a, b) => true if a knows b
false if a does not know b
knows(a, b) does not imply knows(b, a)
@cbarraford
cbarraford / Features
Created March 20, 2014 19:29
Sabisu Features
sabisu
======
A sensu web ui powered by [Cloudant](https://cloudant.com)
Features
========
* Full text search (based on [lucene](http://lucene.apache.org/))
* Complex search, filtering, and sorting