Skip to content

Instantly share code, notes, and snippets.

View inscapist's full-sized avatar

Felx inscapist

  • Penang, Malaysia
View GitHub Profile
@inscapist
inscapist / docker-compose.yml
Last active April 10, 2024 11:32
Pi-Hole + unbound + tailnet search domain (Void linux)
#version: "3"
# More info at https://github.com/pi-hole/docker-pi-hole/ and https://docs.pi-hole.net/
services:
pihole:
container_name: pihole
image: pihole/pihole:latest
network_mode: "host"
# For DHCP it is recommended to remove these ports and instead add: network_mode: "host"
environment:
@inscapist
inscapist / .xinitrc
Last active April 22, 2024 21:20
Nvidia and Xorg on Void Linux
xset r rate 250 60
setxkbmap -option caps:escape
xbacklight -set 10
# paired with `Xft.dpi: 144`
export GDK_DPI_SCALE=1.4
if [ -z "${XDG_RUNTIME_DIR}" ]; then
export XDG_RUNTIME_DIR=/tmp/${USER}-runtime-dir
if [ ! -d "${XDG_RUNTIME_DIR}" ]; then
@thesamesam
thesamesam / xz-backdoor.md
Last active May 22, 2024 14:41
xz-utils backdoor situation (CVE-2024-3094)

FAQ on the xz-utils backdoor (CVE-2024-3094)

This is a living document. Everything in this document is made in good faith of being accurate, but like I just said; we don't yet know everything about what's going on.

Background

On March 29th, 2024, a backdoor was discovered in xz-utils, a suite of software that

@loreanvictor
loreanvictor / RISS.md
Last active March 16, 2024 09:32
Interaction as Content

Can We Get More Decentralised Than The Fediverse?

I guess that the [fediverse][fediverse] will be as decentralised as email: a bit, but not that much. Most people will be dependent on a few major hubs, some groups might have their own hubs (e.g. company email servers), personal instances will be pretty rare. This is in contrast to personal blogging, where every Bob can easily host their own (and they often do). I mean that's already implied by the name: fediverse is [a federated universe, not a distributed one][fed-v-dis].

Why does this matter? Well I like not being dependent on one entity, but I would like it much more if I was dependent on no entities at all. In other words, I like to publish my own personal blog and get all the goodies of a social network, without being dependent on other micro-blogging / social content platforms.

So in this writing, I'm going to:

  • ❓ Contemplate on why the fediverse gets federated not distributed (spoilers: its push vs pull)
  • 🧠 Ideate on how could we get a distri
@inscapist
inscapist / qrgen.nim
Created July 12, 2023 15:19
QR code generator using Nim
import QRgen
import QRgen/renderer
import pkg/[pixie]
import os
# Create a new QR code
let qr = newQR("https://github.com/aruZeta/QRgen", ecLevel=qrECH)
# Generate the QR code
@inscapist
inscapist / trigger.sql
Created May 2, 2023 08:38
Postgres trigger for all table changes (inserts, updates)
CREATE TABLE audit_log (
id SERIAL PRIMARY KEY,
schema_name TEXT NOT NULL,
table_name TEXT NOT NULL,
operation CHAR(1) NOT NULL,
new_data JSONB,
old_data JSONB,
changed_at TIMESTAMP NOT NULL,
changed_by TEXT
);

OpenBSD logo     Rails logo     Falcon logo


Choose OpenBSD for your Unix needs. OpenBSD -- the world's simplest and most secure Unix-like OS. A safe alternatve to the frequent vulnerabilities and overengineering of Linux and related software (NGiNX & Apache (httpd-asiabsdcon2015.pdf), OpenSSL, iptables/nftables, systemd, BIND, Postfix, Docker etc.)

OpenBSD -- the cleanest kernel, the cleanest userland and the cleanest config

@leandronsp
leandronsp / 001-server.bash
Last active May 15, 2024 01:43
A complete yet simple Web server (with login & logout system) written in Shell Script
#!/bin/bash
## Create the response FIFO
rm -f response
mkfifo response
function handle_GET_home() {
RESPONSE=$(cat home.html | \
sed "s/{{$COOKIE_NAME}}/$COOKIE_VALUE/")
}
@triangletodd
triangletodd / README.md
Last active May 14, 2024 13:55
k3s in LXC on Proxmox

On the host

Ensure these modules are loaded

cat /proc/sys/net/bridge/bridge-nf-call-iptables

Disable swap

sysctl vm.swappiness=0
swapoff -a
@graninas
graninas / What_killed_Haskell_could_kill_Rust.md
Last active March 18, 2024 14:57
What killed Haskell, could kill Rust, too

At the beginning of 2030, I found this essay in my archives. From what I know today, I think it was very insightful at the moment of writing. And I feel it should be published because it can teach us, Rust developers, how to prevent that sad story from happening again.


What killed Haskell, could kill Rust, too

What killed Haskell, could kill Rust, too. Why would I even mention Haskell in this context? Well, Haskell and Rust are deeply related. Not because Rust is Haskell without HKTs. (Some of you know what that means, and the rest of you will wonder for a very long time). Much of the style of Rust is similar in many ways to the style of Haskell. In some sense Rust is a reincarnation of Haskell, with a little bit of C-ish like syntax, a very small amount.

Is Haskell dead?