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
@jphsd
jphsd / interprocess.md
Last active October 13, 2024 16:46
Interprocess channels in Go by using named pipes

How to use channels across different processes in Go

A couple of code samples to show how a named pipe can be used to extend Go's channel paradigm for use between different processes running on a system.

  • interprocess1.go details a single byte channel.
  • interprocess2.go details a channel that passes slices of bytes.

Note that opening a write channel will return two channels -

{
"meta": {
"theme": "professional"
},
"basics": {
"name": "Serhii Ivanov",
"phone": "+48572260756",
"label": "Senior Software Engineer | Golang | Kubernetes | SRE | DevOps",
"image": "https://avatars.githubusercontent.com/u/11349489?v=4",
"summary": "Proactive software engineer with Golang as language of choice. I am used to wearing many hats and generally very flexible when investigating new roles.",
@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 July 19, 2024 12:26
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 October 21, 2024 13:51
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 November 13, 2024 09:01
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