Skip to content

Instantly share code, notes, and snippets.

Friedel Ziegelmayer dignifiedquire

  • Germany
Block or report user

Report or block dignifiedquire

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
View log.txt
$ cargo fix --edition
Checking pgp v0.1.0 (/Users/dignifiedquire/opensource/rpgp)
warning: failed to automatically apply fixes suggested by rustc to crate `pgp`
after fixes were automatically applied the compiler reported errors within these files:
* src/composed/shared.rs
* src/composed/signed_key/key_parser_macros.rs
View num-benchmarks.md

benches with u32 digits

running 43 tests
test divide_0          ... bench:         876 ns/iter (+/- 73)
test divide_1          ... bench:      13,661 ns/iter (+/- 2,020)
test divide_2          ... bench:     697,781 ns/iter (+/- 239,589)
test fac_to_string     ... bench:       1,048 ns/iter (+/- 133)
test factorial_100     ... bench:       8,093 ns/iter (+/- 2,855)
test fib2_100          ... bench:       2,150 ns/iter (+/- 503)
View gist:db2f8dc1185cb560e88ca471144cb1b0
ipfs daemon
Initializing daemon...
Swarm listening on /ip4/10.8.0.18/tcp/4001
Swarm listening on /ip4/127.0.0.1/tcp/4001
Swarm listening on /ip4/192.168.0.38/tcp/4001
Swarm listening on /ip4/34.202.193.223/tcp/1027
Swarm listening on /ip6/2a02:8071:b689:2000:4ea:b2c:43a3:dc93/tcp/4001
Swarm listening on /ip6/2a02:8071:b689:2000:5d67:6d90:8956:99d8/tcp/4001
Swarm listening on /ip6/::1/tcp/4001
API server listening on /ip4/127.0.0.1/tcp/5001
View elcid.js
const multihashing = require('multihashing-async')
const CID = require('cids')
const mh = require('multihashing')
// data - Buffer or string, the data to encode
// hashtype - string
// codec - string, 'dag-pb' or 'dag-cbor', one
// callback - called with (Error, CID) depending on the result
function elcidEncode (data, hashtype, codec, callback) {
if (typeof data === 'string') {
View peerinfo.js
// torn between addr, multiaddr, multiaddress and address
// multi<> seems not needed as we only ever talk about multiaddresses so I feel that is superflous in this context
// Manage multiaddrs
// TODO: do we want ttl handling now?
class MultiaddrSet {
constructor (addrs) {}
get length () {}
View log.txt
DEBUG=libp2p* node_modules/mocha/bin/mocha --timeout 50000 test/index.spec.js
DHT
libp2p:swarm:dialer create: 8 peer limit, 10000 dial timeout +0ms
libp2p:swarm:transport adding TCP +6ms
libp2p:tcp:listen Listening on 9990 127.0.0.1 +6ms
libp2p:swarm:dialer create: 8 peer limit, 10000 dial timeout +3ms
libp2p:swarm:transport adding TCP +1ms
libp2p:tcp:listen Listening on 9991 127.0.0.1 +1ms
View gx-slow
./bin/gx --verbose install
installing package: go-ipfs-0.4.6-dev
[1 / 49] fetched dep: goprocess
[2 / 49] fetched dep: go-log
[3 / 49] fetched dep: go-libp2p-crypto
[4 / 49] fetched dep: semver
[5 / 49] fetched dep: go-libp2p-peer
[6 / 49] fetched dep: bbloom
[7 / 49] fetched dep: go-libp2p-secio
[8 / 49] fetched dep: base32
View gist:68f882ff94d63e195dbda124944d9d00
RUST_BACKTRACE=1 cargo +stable test
Updating git repository `https://github.com/flier/rust-bindgen`
Compiling bindgen v0.21.2 (https://github.com/flier/rust-bindgen?branch=fix-493#e08072a1)
Compiling librtcd v0.1.0 (file:///Users/dignifiedquire/opensource/webrtc/librtcd.rs)
error[E0428]: a type named `const_iterator` has already been defined in this module
--> /Users/dignifiedquire/opensource/webrtc/librtcd.rs/target/debug/build/librtcd-c59004986512dc00/out/bindings.rs:47050:5
|
47048 | pub type const_iterator =
| _____- starting here...
47049 | | root::std::__wrap_iter<*const ::std::os::raw::c_char>;
View gist:cb97915e83c52361c7b5de6e9e7cc5d7
RUST_BACKTRACE=1 RUST_LOG=bindgen cargo build
Updating registry `https://github.com/rust-lang/crates.io-index`
Compiling bindgen v0.21.2
Compiling librtcd v0.1.0 (file:///Users/dignifiedquire/opensource/webrtc/librtcd.rs)
error[E0428]: a type named `difference_type` has already been defined in this module
--> /Users/dignifiedquire/opensource/webrtc/librtcd.rs/target/debug/build/librtcd-8a0cfdcd85090276/out/bindings.rs:36704:5
|
36702 | pub type difference_type = isize;
| --------------------------------- previous definition of `difference_type` here
36703 | pub type type_ = root::difference_type;
View gist:8ff4a1edf108e2de5821663b5bf3b91f
➜ librtcdcpp (master) ✗ git add .
g% ➜ librtcdcpp (master) ✗ git stash
Saved working directory and index state WIP on master: 8a96882 Adjusted Copyright.
HEAD is now at 8a96882 Adjusted Copyright.
➜ librtcdcpp (master) ✔ mkdir build
➜ librtcdcpp (master) ✔ cd build
➜ build (master) ✔ cmake ..
-- The CXX compiler identification is AppleClang 8.0.0.8000042
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -- works
You can’t perform that action at this time.