Skip to content

Instantly share code, notes, and snippets.

View popsUlfr's full-sized avatar
⛩️
Passing through

Philipp Richter popsUlfr

⛩️
Passing through
View GitHub Profile
@popsUlfr
popsUlfr / streampubsub.go
Created June 28, 2021 10:38
libp2p minimal streams
package main
import (
"bufio"
"context"
"errors"
"fmt"
"io"
"log"
"os"
@popsUlfr
popsUlfr / pub.go
Created June 28, 2021 10:37
libp2p minimal pubsub
package main
import (
"context"
"errors"
"log"
"os"
"os/signal"
"sync"
"syscall"
@popsUlfr
popsUlfr / pub.go
Last active April 1, 2023 16:48
ipfs coreapi minimal pubsub
package main
import (
"context"
"log"
"time"
"github.com/ipfs/go-ipfs/core"
"github.com/ipfs/go-ipfs/core/coreapi"
"github.com/ipfs/go-ipfs/core/node"
@popsUlfr
popsUlfr / README.md
Last active May 20, 2022 09:12
nftables

Setup

Copy nftables.conf to /etc/nftables.conf

Install nftables

pacman -S --needed nftables iptables-nft
source /usr/lib/prezto/runcoms/zpreztorc
# 'autosuggestions' after syntax-highlighting and history-substring-search
# 'completion' after utility
# 'environment' first
# 'fasd' after completion
# 'history-substring-search' after syntax-highlighting
# 'syntax-highlighting' before history-substring-search, prompt
zstyle ':prezto:load' pmodule \
'environment' \
#!/bin/bash
shopt -s extglob
# generated from util-linux source: libmount/src/utils.c
declare -A pseudofs_types=([anon_inodefs]=1
[autofs]=1
[bdev]=1
[bpf]=1
[binfmt_misc]=1
@popsUlfr
popsUlfr / frtestbleve1.go
Last active March 30, 2020 17:21
github.com/blevesearch/bleve v0.8.2 mapping problem with french text
package main
import (
"fmt"
"github.com/blevesearch/bleve"
"github.com/blevesearch/bleve/analysis/lang/fr"
)
type WebResource struct {
Computer Information:
Manufacturer: Unknown
Model: Unknown
Form Factor: Desktop
No Touch Input Detected
Processor Information:
CPU Vendor: AuthenticAMD
CPU Brand: AMD Ryzen 9 5900X 12-Core Processor
CPU Family: 0x19
@popsUlfr
popsUlfr / ntdll_override.c
Created October 31, 2018 17:24
Loads a custom ntdll.dll.so in wine for Bayonetta
/* gcc -m32 -O2 -Wall -shared -fPIC -ldl -o ntdll_override.so ntdll_override.c */
#define _GNU_SOURCE
#include <dlfcn.h>
#include <string.h>
#include <unistd.h>
#include <limits.h>
#include <stdlib.h>
typedef void* (*wine_dlopen_func_type)(const char *filename, int flag, char *error, size_t errorsize);