Skip to content

Instantly share code, notes, and snippets.

View s3rj1k's full-sized avatar
🍀
https://andersoncardoso.github.io/ydd/

s3rj1k s3rj1k

🍀
https://andersoncardoso.github.io/ydd/
View GitHub Profile
@michaelbeaumont
michaelbeaumont / mkosi.build.chroot
Last active May 24, 2024 13:25
Using mkosi and AUR to install packages
#!/usr/bin/env bash
set -ex
PACKAGES=(
neovim-git
)
# All this is basically to get around makepkg calling pacman with sudo
# Otherwise we could just call `aur sync` and be done with it
@alpominth
alpominth / rt_table123.sh
Last active June 25, 2024 17:30
rt_table123.sh - Easily create a firewall mark for an additional routing table and expose the IP adress(es) of a network interface to the system
#!/bin/bash
FW_MARK="$((RANDOM%2147483646 + 1))"
if [ "$(ip -4 rule show fwmark ${FW_MARK})" ] || [ "$(ip -6 rule show fwmark ${FW_MARK})" ]; then
while [ "$(ip -4 rule show fwmark ${FW_MARK})" ] || [ "$(ip -6 rule show fwmark ${FW_MARK})" ]; do
FW_MARK="$((RANDOM%2147483646 + 1))"
done
fi
TABLE="$((RANDOM%2147483396 + 1))"
if [ ! "$(ip -4 route show table ${TABLE} 2>/dev/null || echo 1)" = "1" ] || [ ! "$(ip -6 route show table ${TABLE} 2>/dev/null || echo 1)" = "1" ]; then
@yzdbg
yzdbg / auto-dr.md
Last active November 3, 2023 17:11

Automating Daily Reports, because fuck it, really...

Each day at our company, developers are required to document their activities, painstakingly jotting down their daily work and future plans. A monotonous chore that I just really dislike.

So now, there's a scribe for that :

auto-dr-

Code

@karolba
karolba / alpine-on-stardust-no-rescue.md
Last active November 12, 2023 16:47
Install Alpine Linux on Scaleway Stardust without the rescue image using https://netboot.xyz

A way to install Alpine Linux on a Scaleway Stardust instance without the use of a rescue image, but by booting into the install image over the network using https://netboot.xyz.

  1. Connect to the serial console, using scw instance server console {uuid} zone={zone}

  2. Reboot the VM into UEFI settings

    • either by executing systemctl reboot --firmware on the machine
    • or by using scw instance server reboot {uuid} zone={zone} locally and repeatedly mashing the escape key on the serial console image
  3. Go to Device Manager -> Network Device List -> the only network device -> HTTP Boot Configuration -> Boot URI

@joelonsql
joelonsql / PostgreSQL-EXTENSIONs.md
Last active June 27, 2024 23:18
1000+ PostgreSQL EXTENSIONs

🗺🐘 1000+ PostgreSQL EXTENSIONs

This is a list of URLs to PostgreSQL EXTENSION repos, listed in alphabetical order of parent repo, with active forks listed under each parent.

⭐️ >= 10 stars
⭐️⭐️ >= 100 stars
⭐️⭐️⭐️ >= 1000 stars
Numbers of stars might not be up-to-date.

@Ompluscator
Ompluscator / main.go
Created September 25, 2021 11:41
Go Proxy Full
package main
import (
"archive/zip"
"bytes"
"encoding/json"
"fmt"
"io"
"io/ioutil"
"log"
@NiKiZe
NiKiZe / dnsmasq.conf
Last active January 27, 2024 06:16
Trying to chainload iPXE with full feature set from a lesser featured one. dnsmasq ProxyDHCP edition
# Known working dnsmasq version 2.85 config for iPXE proxydhcp usage
# things to replace:
# * 10.1.1.0 - your subnet
# * eth0 - interface to listen on, or switch to bind-dynamic
# * 10.1.1.2 - your tftp server ip
# * http://gentoo.ipxe.se/boot.ipxe - script to run once inside iPXE
# Debug logging
log-debug

Docker in Docker (rootless) - Audit

This is just a quick test to see if we can jailbreak rootless Docker-in-Docker.

The pod we're using has 2 containers, one that runs the daemon, and one that keeps the user separated from the privileged pod completely.

We have created deploy.yaml and we have dind-rootless running.

$ kubectl get pods
NAME                             READY   STATUS    RESTARTS   AGE
dind-rootless-5ddddf649b-sk9bv   2/2     Running   0          106s
@unixfox
unixfox / README.md
Last active August 29, 2023 03:52
Install alpine linux on Scaleway stardust
  1. Reboot into the rescue image
  2. Then execute these commands:
cd /dev/shm
mkdir alpine
cd alpine
wget https://dl-cdn.alpinelinux.org/alpine/v3.16/releases/x86_64/alpine-minirootfs-3.16.0-x86_64.tar.gz
tar xzvf alpine*
mount -t proc /proc proc/
mount -t sysfs /sys sys/