Skip to content

Instantly share code, notes, and snippets.

View Kubuxu's full-sized avatar

Jakub Sztandera Kubuxu

  • Protocol Labs
  • Kraków, Poland
View GitHub Profile
/ # cpp -dM empty.h
#define __SSP_STRONG__ 3
#define __DBL_MIN_EXP__ (-1021)
#define __UINT_LEAST16_MAX__ 0xffff
#define __ATOMIC_ACQUIRE 2
#define __FLT_MIN__ 1.17549435082228750797e-38F
#define __GCC_IEC_559_COMPLEX 2
#define __UINT_LEAST8_TYPE__ unsigned char
#define __SIZEOF_FLOAT80__ 16
#define __INTMAX_C(c) c ## L
thread '<unnamed>' panicked at 'failed to write file "out/A/2001_Vegalta_Sendai_season.html"', /checkout/src/libcore/option.rs:785
thread '<unnamed>' panicked at 'failed to write file "out/A/2005_Denmark_Open.html"', /checkout/src/libcore/option.rs:785
thread '<unnamed>' panicked at 'failed to write file "out/A/(85633)_1998_KR65.html"', /checkout/src/libcore/option.rs:785
thread '<unnamed>' panicked at 'failed to write file "out/I/m/1979-1983_William_F._Engel.jpg"', /checkout/src/libcore/option.rs:785
thread '<unnamed>' panicked at 'failed to write file "out/A/2003_NECBL_season.html"', /checkout/src/libcore/option.rs:785
thread '<unnamed>' panicked at 'failed to write file "out/A/1897.html"', /checkout/src/libcore/option.rs:785
thread '<unnamed>' panicked at 'failed to write file "out/A/10_Years_of_Cheap_Fame.html"', /checkout/src/libcore/option.rs:785
thread '<unnamed>' panicked at 'failed to write file "out/A/16_(Regina)_Field_Ambulance.html"', /checkout/src/libcore/option.rs:785
thread '<unnamed>' panicked
WARNING: DATA RACE
Read at 0x00c420444410 by goroutine 47:
gx/ipfs/QmTnsezaB1wWNRHeHnYrm8K4d5i9wtyj3GsqjC3Rt5b5v5/go-multistream.(*lazyConn).Write()
/home/kubuxu/go/src/gx/ipfs/QmTnsezaB1wWNRHeHnYrm8K4d5i9wtyj3GsqjC3Rt5b5v5/go-multistream/lazy.go:114 +0x48
gx/ipfs/QmapADMpK4e5kFGBxC2aHreaDqKP9vmMng5f91MA14Ces9/go-libp2p/p2p/host/basic.(*streamWrapper).Write()
/home/kubuxu/go/src/gx/ipfs/QmapADMpK4e5kFGBxC2aHreaDqKP9vmMng5f91MA14Ces9/go-libp2p/p2p/host/basic/basic_host.go:462 +0x75
gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV/gogo-protobuf/io.(*varintWriter).WriteMsg()
/home/kubuxu/go/src/gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV/gogo-protobuf/io/varint.go:74 +0x259
gx/ipfs/QmapADMpK4e5kFGBxC2aHreaDqKP9vmMng5f91MA14Ces9/go-libp2p/p2p/protocol/identify.(*IDService).RequestHandler()
/home/kubuxu/go/src/gx/ipfs/QmapADMpK4e5kFGBxC2aHreaDqKP9vmMng5f91MA14Ces9/go-libp2p/p2p/protocol/identify/id.go:133 +0x360
data = dlmread('wprice');
data = data';
dt = 5*60;
N = length(data);
Fs = 1/(dt);
t = 0:1/Fs:(N-1)*dt;
x = data - mean(data);
subplot(2,1,1);
@Kubuxu
Kubuxu / providers okrs.md.md
Created October 17, 2018 10:16
providers okrs.md
  • cid-crums while walking graphs
  • ancher blocks
  • breakoff content routing from bitswap
  • design the strategies

KRs:

  • Able to add npm, tr-wikipedia without turning off providing.
  • Providers records scale sublinear with content.
  • Write 4 user stories about user expirience with providing/resolving.
#!/bin/bash
FILE="$1"
TYPE="$(file $1)"
if ! echo "$TYPE" | grep "compressed data" >/dev/null 2>&1; then
echo "Plik $FILE nie jest zkompressowany";
exit 1
fi
case "$FILE" in
*.zip)
#!/usr/bin/env bash
cat <<EOF | xargs -L1 ipfs ping -n 1
QmUd6zHcbkbcs7SMxwLs48qZVX3vpcM8errYS7xEczwRMA
QmbVWZQhCGrS7DhgLqWbgvdmKN7JueKCREVanfnVpgyq8x
QmUEMvxS2e7iDrereVYc5SWPauXPyNwxcy9BXZrC1QTcHE
QmdnXwLrC8p1ueiq2Qya8joNvk3TVVDAut7PrikmZwubtR
QmNSYxZAiJHeLdkBg38roksAR9So7Y5eojks1yjEcUtZ7i
EOF
#!/usr/bin/env bash
BADGOMODREGEX='\+replace.*=>\s+[/.]'
exec < /dev/tty
if git ls-files go.mod >/dev/null && [[ $(git diff --cached go.mod | grep -E -c "$BADGOMODREGEX") -ne 0 ]]; then
git diff --cached go.mod | grep -E "$BADGOMODREGEX"
read -p "There are local replace directives in go.mod. Are you sure you want to continue (y/n): " yn
#!/usr/bin/env bash
set -euo pipefail
travis_file=$(cat travis.example.yml)
## do_convert() performs the conversion. It can be called with an optional argument: the module to start with.
do_convert() {
modules=()
for d in $(find . -maxdepth 1 -mindepth 1 -type d | sort)
do
if [[ "$d" < ${1:-} ]]; then
module github.com/ipfs/go-ipfs
require (
bazil.org/fuse v0.0.0-20180421153158-65cc252bf669
github.com/Kubuxu/go-os-helper v0.0.1
github.com/blang/semver v3.5.1+incompatible
github.com/bren2010/proquint v0.0.0-20160323162903-38337c27106d
github.com/cenkalti/backoff v2.1.1+incompatible
github.com/cheggaaa/pb v2.0.6+incompatible
github.com/dustin/go-humanize v1.0.0