Skip to content

Instantly share code, notes, and snippets.

gnunicorn /
Created Sep 9, 2020
a short `cargo play` example of building `'static tracing_core::Metadata<'static>` from non-static strings
//# lazy_static = "1.4.0"
//# tracing = "0.1.19"
//# tracing-core = "0.1.16"
//# parking_lot = "0.10"
use tracing;
use tracing_core;
use parking_lot::Mutex;
View cargo tree.txt
substrate-client v0.1.0 (file:///home/ben/dev/parity/substrate/substrate/client)
├── ed25519 v0.1.0 (file:///home/ben/dev/parity/substrate/substrate/ed25519)
│ ├── base58 v0.1.0
│ ├── blake2-rfc v0.2.18
│ │ ├── arrayvec v0.4.7
│ │ │ └── nodrop v0.1.12
│ │ └── constant_time_eq v0.1.3
│ ├── hex-literal v0.1.1
│ │ ├── hex-literal-impl v0.1.1
│ │ │ └── proc-macro-hack v0.4.1
View compile.error
Compiling triehash v0.1.2
Compiling jsonrpc-macros v8.0.1 (
error[E0308]: mismatched types
--> /home/ben/.cargo/registry/src/
138 | fn gen_trie_root<A: AsRef<[u8]>, B: AsRef<[u8]>>(input: &[(A, B)]) -> H256 {
| ---- expected `ethereum_types::H256` because of return type
141 | keccak(stream.out())
| ^^^^^^^^^^^^^^^^^^^^ expected struct `ethereum_types::H256`, found struct `hash::H256`
gnunicorn / cargo.toml
Created Jun 4, 2018
testing connection leaking of parity's jsonrpc
View cargo.toml
name = "json-rpc-tester"
version = "0.1.0"
authors = ["Benjamin Kampmann <>"]
jsonrpc-ipc-server = { git = "" }
jsonrpc-pubsub = { git = "" }
log = "*"
env_logger = "*"
import requests
from requests.auth import HTTPDigestAuth
import json
url = 'http://localhost:8100/auth'
#url = 'http://api.safenet/auth'
payload = {
"app": {
"name": "Testing",
View dc_migration_helper.rb
def find_all_cats(category_id)
Category.where(:parent_category_id => category_id).pluck(:id) << category_id
def replace_topic_with_permalink(topic)
current = topic.relative_url => current, :external_url => "#{NEW_SERVER}#{current}").save

Keybase proof

I hereby claim:

  • I am ligthyear on github.
  • I am techcreationist ( on keybase.
  • I have a public key whose fingerprint is 3127 E8B7 8AF0 F85B E356 7241 B9C0 1D7D D160 98D8

To claim this, I am signing this object:


Intro to the reader:

This is a potential outline for blog posts profiling and covering open source tech ventures. The objective of these posts is to show that there is a variety of financing models to sustain Open (-Source) Tech Ventures. A secondary objective is to give more exposure and visibility to the projects.

Please take a look at the following structure and provide feedback whether you think this is achieving these goals, as well as this covers the important aspects of your venture. Please comment on anything you deem important to mention. Still this is just a draft, so if you think I should start over, please mention that, too.

Thank you for your time and feedback!

View adsense_injct.tmpl.yml
path: 5
{{#if Discourse.Mobile.mobileView}}
{{adsenseBlock "320" "50" "topic_bottom_mobile"}}
{{adsenseBlock "728" "90" "topic_bottom"}}
View Contract Killer

Contract Killer 3

Revised date: 07/11/2012

Between us [company name] and you [customer name]


We’ll always do our best to fulfil your needs and meet your expectations, but it’s important to have things written down so that we both know what’s what, who should do what and when, and what will happen if something goes wrong. In this contract you won’t find any complicated legal terms or long passages of unreadable text. We’ve no desire to trick you into signing something that you might later regret. What we do want is what’s best for both parties, now and in the future.