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
@Kubuxu
Kubuxu / profile.txt
Created November 9, 2016 22:58
silent army profile
Flat profile:
Each sample counts as 0.01 seconds.
% cumulative self self total
time seconds seconds calls ms/call ms/call name
100.06 0.04 0.04 59621 0.00 0.00 verify_sol
0.00 0.04 0.00 100156 0.00 0.00 sort_pair
0.00 0.04 0.00 9600 0.00 0.00 mix
0.00 0.04 0.00 3100 0.00 0.00 check_clSetKernelArg
0.00 0.04 0.00 1200 0.00 0.00 check_clEnqueueNDRangeKernel
@Kubuxu
Kubuxu / libp2p pnet - writeup.md
Last active March 27, 2022 13:14
libp2p Private Networks - pnet

Pre-shared Key Based Private Networks in IPFS

This document describes the first version of private networks (PN) featured in IPFS.

Only pre-shared key (PSK) functionality is available for the first implementation, as the Public Key Infrastructure approach is much more complex and requires more technical preparation.

It was implemented as an additional encryption layer before any IPFS traffic and is designed to leak the absolute minimum of information on its own. All traffic leaving the node inside a PN is encrypted, and there is no characteristic handshake.

Interface

@Kubuxu
Kubuxu / clone-all.go
Created September 22, 2016 16:42
Clone all Github repos in an org
package main
import (
"fmt"
"os"
"os/exec"
"strings"
"github.com/google/go-github/github"
)
@Kubuxu
Kubuxu / ipfs-daemon-remote.sh
Last active March 2, 2021 06:34
Tunnel IPFS API via SSH
#!/usr/bin/env bash
REMOTE_HOST=${1-"YOUR REMOTE HOST HERE"}
DEFAULT_API_FILE="$HOME/.ipfs/api"
API_FILE="${IPFS_PATH-$DEFAULT_API_FILE}"
if [ -e "$API_FILE" ]; then
echo "IPFS API is already running"
exit 1
fi
@Kubuxu
Kubuxu / generated with
Created June 9, 2016 15:43
Goroutine leak report
cat ../ipfs.stacks| sed -e 's/(0x.*$//' -e 's/ +0x.*$//' | grep -v -e '^goroutine' | csplit -s - '/^$/' '{*}' -f trace -n 5
find . -type f -exec sha1sum '{}' \+ | sort | uniq -c --check-chars=40 | sort -nr | awk '{if($1 > 100) {print "\n";print $1 " times"; system("cat " $3)}}'
@Kubuxu
Kubuxu / curl
Last active April 3, 2016 20:24
IPFS gateways HEAD not working
dig ipfs.io +short | xargs -L1 -i -- curl -Iv --max-time 30 {}/ipfs/QmVLRLxc9jDTkF7KLnfUr9hSrB4QjuhRjBS9bGTmPfK5Lx/
* Trying 162.243.248.213...
* Connected to 162.243.248.213 (162.243.248.213) port 80 (#0)
> HEAD /ipfs/QmVLRLxc9jDTkF7KLnfUr9hSrB4QjuhRjBS9bGTmPfK5Lx/ HTTP/1.1
> Host: 162.243.248.213
> User-Agent: curl/7.47.1
> Accept: */*
>
* Operation timed out after 30001 milliseconds with 0 bytes received
* Closing connection 0
@Kubuxu
Kubuxu / NeverSink.filter
Created March 20, 2016 08:31
NeverSink's lootfilter
#---------------------------------------------------------------------------------------------------------------
# NeverSink's Indepth Loot Filter
# VERSION 3.12 - Full Version
#---------------------------------------------------------------------------------------------------------------
#
# You can always find the latest version here:
# http://pastebin.com/Af00CbhA
# Forum discussion thread. You can post question and feedback here:
# http://www.pathofexile.com/forum/view-thread/1246208/page/1
# Please use this thread for feedback, questions and suggestions
@Kubuxu
Kubuxu / ipfs-publish
Created February 22, 2016 16:04
Script to publish directory to filesAPI with timestamping support
#!/usr/bin/env bash
usage() {
echo "$0 [dir_to_publish [, target_dir_in_files_api]]"
echo "If there are no arguments file .ipfspublish in current working directory is loaded and evaluated."
echo "It has to assign value to PUBLIC_DIR and can assign value to TARGET_DIR."
echo "If there is no target directory specified its value is same as public directory."
exit 1
}
@Kubuxu
Kubuxu / glibc.log
Last active January 25, 2016 05:32
GNU gdb (Debian 7.7.1+dfsg-5) 7.7.1
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.

Mathematical Analysis:

  • Kinga MC Inerney (duty hours: Wed. 8:15am-9:9:45
  • [email protected]
  • 16, 22ᵗʰ Oct - basic Test
  • differentiation, Taylor series, curve scratching
  • 13, 19ᵗʰ Nov - Exam
  • indefinite integrals - 10, 11st Dec - Exam
  • definite integrals - 7, 8ᵗʰ Jan
  • Final additional test - 18ᵗʰ Jan