Skip to content

Instantly share code, notes, and snippets.

Avatar
:octocat:
Hello 👋

Krzysztof Wilczyński kwilczynski

:octocat:
Hello 👋
View GitHub Profile
View gist:8b3d03ec5d685043c23d6ea29b404756
>>> a = 975205316
>>> b = 4096
>>> (a + b) - (a % b)
975208448
>>> ((a + b) - (a % b)) + 64
975208512
>>> 975208448 % 4096
0
>>> a + (b - 1) & ~(b - 1)
975208448
View dnscrypt-proxy.toml
server_names = [
'cloudflare',
'doh-crypto-sx',
'ams-doh-nl',
# Possible issues.
# 'faelix-ch-ipv4-doh',
'doh.ffmuc.net'
]
listen_addresses = [
@kwilczynski
kwilczynski / cmdline.txt
Last active Oct 11, 2021
Raspberry Pi 4 - /boot/cmdline.txt
View cmdline.txt
coherent_pool=1M
8250.nr_uarts=1
dwc_otg.fiq_fix_enable=1
dwc_otg.lpm_enable=0
dwc_otg.microframe_schedule=1
dwc_otg.nak_holdoff_enable=1
sdhci-bcm2708.missing_status=0
snd_bcm2835.enable_compat_alsa=0
snd_bcm2835.enable_hdmi=1
bcm2708_fb.fbwidth=0
@kwilczynski
kwilczynski / config.txt
Last active Oct 11, 2021
Raspberry Pi 4 - /boot/config.txt
View config.txt
dtparam=i2c=off
dtparam=i2s=off
dtparam=spi=off
dtparam=uart0=off
dtparam=uart1=off
dtparam=audio=off
dtoverlay=disable-wifi
View Dockerfile
ARG go_version=1.17
ARG alpine_version=latest
FROM golang:${go_version}-alpine AS builder
ARG GOOS=linux
ARG GOARCH=amd64
ENV GOOS=${GOOS}
ENV GOARCH=${GOARCH}
View Dockerfile
ARG go_version=1.17
ARG alpine_version=latest
FROM golang:${go_version}-alpine AS builder
ARG GOOS=linux
ARG GOARCH=amd64
ENV GOOS=${GOOS}
ENV GOARCH=${GOARCH}
View gist:950f01f6fe15b19159ed38db82558dff
[ 0.000000] Linux version 5.15.0-rc1-00030-ge1f6bad31de3-dirty (kwilczynski@workstation) (alpha-linux-gnu-gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0, GNU ld (GNU Binutils for Ubuntu) 2.34) #7 SMP Thu Sep 16 02:05:12 UTC 2021
[ 0.000000] Booting GENERIC on Tsunami variation Clipper using machine vector Clipper from SRM
[ 0.000000] Major Options: SMP VERBOSE_MCHECK
[ 0.000000] Command line: console=ttyAMA0 console=ttyS0,115200n8 loglevel=8 ignore_loglevel panic=-1 nopat nofgkaslr nokaslr norandmaps earlyprintk=serial,ttyS0 printk.devkmsg=on printk.time=y
[ 0.000000] memcluster 0, usage 1, start 0, end 15
[ 0.000000] memcluster 1, usage 0, start 15, end 32768
[ 0.000000] Initial ramdisk at: 0x(____ptrval____) (18700902 bytes)
[ 0.000000] SMP: 1 CPUs probed -- cpu_present_mask = 1
[ 0.000000] Zone ranges:
[ 0.000000] DMA [mem 0x0000000000000000-0x000000ffffffdfff]
View gist:4b71cef156e40fd565e9833565119a75
+ export PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
+ PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
+ umask 022
+ ARCHS=(['x86_64']='x86_64-linux-gnu-' ['alpha']='alpha-linux-gnu-' ['arm64']='aarch64-linux-gnu-')
+ declare -A ARCHS
+ ARCH=x86_64
+ CROSS_COMPILE=x86_64-linux-gnu-
+ KCFLAGS=-Warray-bounds
++ nproc
+ MAKEFLAGS=-j15
View patch.diff
diff --git c/arch/alpha/boot/vmlinux w/arch/alpha/boot/vmlinux
new file mode 100755
index 000000000000..aec4fdb57e52
Binary files /dev/null and w/arch/alpha/boot/vmlinux differ
diff --git c/arch/alpha/kernel/pci-sysfs.c w/arch/alpha/kernel/pci-sysfs.c
index 0021580d79ad..35d0632d0897 100644
--- c/arch/alpha/kernel/pci-sysfs.c
+++ w/arch/alpha/kernel/pci-sysfs.c
@@ -14,6 +14,7 @@
#include <linux/stat.h>
@kwilczynski
kwilczynski / script.sh
Created Mar 23, 2021
Dump ad list (ad blocking list), whitelist and blacklist from Sqlite database on Pi Hole
View script.sh
sqlite3 gravity.db.backup -header -csv 'select * from adlist' > adlist.csv
sqlite3 gravity.db.backup -header -csv 'select * from vw_whitelist' > whitelist.csv
sqlite3 gravity.db.backup -header -csv 'select * from vw_blacklist' > blacklist.csv