Skip to content

Instantly share code, notes, and snippets.

View cosmikwolf's full-sized avatar

Tenkai Kariya cosmikwolf

View GitHub Profile
@cosmikwolf
cosmikwolf / This is the output when I try and do a libp2p-lookup on the address of the listener.txt
Last active February 12, 2023 22:40
This is a set of debug logs I collected from my implementation of the dcutr hole punching example. My connection is failing, and I don't know why. The example I am following is available here: https://docs.rs/libp2p/latest/src/libp2p/tutorials/hole_punching.rs.html#21-183 I am using the latest rust libp2p2 git tag v0.50.0
RUST_LOG=debug cargo run --example dcutr -p libp2p-dcutr -- --secret-key-seed 1 --mode listen --relay-address /ip4/x.x.x.x/tcp/4008/p2p/12D3KooWDpJ7As7BWAwRMfu1VU2WCqNjvq387JEYKDBj4kx6nXTN
Finished dev [unoptimized + debuginfo] target(s) in 0.59s
Running `target/debug/examples/dcutr --secret-key-seed 1 --mode listen --relay-address /ip4/x.x.x.x/tcp/4008/p2p/12D3KooWDpJ7As7BWAwRMfu1VU2WCqNjvq387JEYKDBj4kx6nXTN`
[2023-02-12T22:36:05Z INFO dcutr] Local peer id: PeerId("12D3KooWPjceQrSwdWXPyLLeABRXmuqt69Rg3sBYbU1Nft9HyQ6X")
[2023-02-12T22:36:05Z DEBUG libp2p_tcp] listening on 0.0.0.0:0
[2023-02-12T22:36:05Z DEBUG libp2p_tcp] New listen address: /ip4/127.0.0.1/tcp/60605
[2023-02-12T22:36:05Z DEBUG libp2p_swarm] Listener ListenerId(9480898041044553357); New address: "/ip4/127.0.0.1/tcp/60605"
[2023-02-12T22:36:05Z INFO dcutr] Listening on "/ip4/127.0.0.1/tcp/60605"
[2023-02-12T22:36:05Z DEBUG libp2p_tcp] New listen address: /ip4/192.168.50.16/tcp/60605
[2023-02-12T22:36:05Z
@cosmikwolf
cosmikwolf / downsample_by2.c
Last active December 17, 2019 21:14
a small c program to perform downsampling on raw audio data
#include <stdio.h>
#include <stdlib.h>
// Tenkai Kariya tenkai@zetaohm.com www.zetaohm.com 12/17/19
// Usage: ./downsample_by2 inputfile.raw outputfile.raw
// downsample will take a raw input audio file and output
// an audio file that has been downsampled to half the
// sample rate. I.E. if you send audio with a 44100 sample rate, it will be
// reduced to 22050
// with SOX installed on OS X, you can play the raw file with the following command