Skip to content

Instantly share code, notes, and snippets.

View signalpillar's full-sized avatar

Volodymyr Vitvitskyi signalpillar

View GitHub Profile
@gdamjan
gdamjan / README.md
Last active April 21, 2025 17:13 — forked from gdamjan-loka/README.md
Local Docker registry running in Kubernetes / k3s

Install a docker registry in a k3s kubernetes cluster

k3s doesn't have a builtin plugin for a local registry, so this is how to install the docker registry. The registry will be exposed via the default traefik ingress (on port 80 and 443).

Assumptions

  • resolvectl query registry.localhost returns 127.0.0.1 - on most Linux distros it does. If not, enable and configure systemd-resolved
  • K3s comes with traefik ingress controller by default, so the ingress for the registry service is configured for that.
@jmatsushita
jmatsushita / README
Last active April 14, 2025 23:16
Setup nix, nix-darwin and home-manager from scratch on an M1 Macbook Pro
###
### [2023-06-19] UPDATE: Just tried to use my instructions again on a fresh install and it failed in a number of places.
###. Not sure if I'll update this gist (though I realise it seems to still have some traffic), but here's a list of
###. things to watch out for:
### - Check out the `nix-darwin` instructions, as they have changed.
### - There's a home manager gotcha https://github.com/nix-community/home-manager/issues/4026
###
# I found some good resources but they seem to do a bit too much (maybe from a time when there were more bugs).
# So here's a minimal Gist which worked for me as an install on a new M1 Pro.
@jj1bdx
jj1bdx / f32auout.py
Last active December 16, 2023 13:55
PortAudio script for 32-bit float audio to output from stdin
#!/usr/bin/env python3
# Pyaudio output device for 32-bit floating audio input from stdin
import pyaudio
import signal
import sys
import time
argvs = sys.argv
argc = len(argvs)
@abrochard
abrochard / presentation.org
Last active March 7, 2025 21:53
Notes from the "Conquering Kubernetes with Emacs" presentation

Conquering Kubernetes with Emacs

Specific Annoying workflow

Listing pods with kubectl get pods, then select a pod name and copy paste it into kubectl logs [pod name]

Why?

  • I want to streamline my workflow and stop using the terminal
  • learn more about kubernetes
  • main kubernetes extension for Emacs out there is greedy for permissions
@sorenvonsarvort
sorenvonsarvort / a-infinality-w10-config.sh
Last active June 2, 2023 22:41
windows-10-like-font-rendering-config-for-linux
# make sure You have installed the infinality patches
export INFINALITY_FT_FILTER_PARAMS="8 17 50 17 8"
export INFINALITY_FT_GRAYSCALE_FILTER_STRENGTH="0"
export INFINALITY_FT_FRINGE_FILTER_STRENGTH="55"
export INFINALITY_FT_AUTOHINT_HORIZONTAL_STEM_DARKEN_STRENGTH="0"
export INFINALITY_FT_AUTOHINT_VERTICAL_STEM_DARKEN_STRENGTH="0"
export INFINALITY_FT_WINDOWS_STYLE_SHARPENING_STRENGTH="20"
export INFINALITY_FT_CHROMEOS_STYLE_SHARPENING_STRENGTH="0"
export INFINALITY_FT_STEM_ALIGNMENT_STRENGTH="0"
@mrk-han
mrk-han / emulator-install-using-avdmanager.md
Last active March 13, 2025 16:33
Installing and creating Emulators with AVDMANAGER (For Continuous Integration Server or Local Use)

Install and Create Emulators using AVDMANAGER and SDKMANAGER

TL;DR

For an emulator that mimics a Pixel 5 Device with Google APIs and ARM architecture (for an M1/M2 Macbook):

  1. List All System Images Available for Download: sdkmanager --list | grep system-images

  2. Download Image: sdkmanager --install "system-images;android-30;google_atd;arm64-v8a"

@rupert
rupert / europython-2018.md
Created July 28, 2018 15:22
EuroPython 2018
#!/bin/sh
printf "checking for nixbld group... "
/usr/bin/dscl . -read /Groups/nixbld &> /dev/null
case $? in
0) echo "yes" ;;
56)
echo "no, created"
sudo /usr/sbin/dseditgroup -o create -r "Nix build group for nix-daemon" -i 30000 nixbld >&2 || exit
;;
@maxclaus
maxclaus / curl-get-status-code-and-response-body.sh
Created November 24, 2015 17:52
Curl - Get status code and response body
URL="http://stackoverflow.com/"
# store the whole response with the status at the and
HTTP_RESPONSE=$(curl --silent --write-out "HTTPSTATUS:%{http_code}" -X POST $URL)
# extract the body
HTTP_BODY=$(echo $HTTP_RESPONSE | sed -e 's/HTTPSTATUS\:.*//g')
# extract the status
HTTP_STATUS=$(echo $HTTP_RESPONSE | tr -d '\n' | sed -e 's/.*HTTPSTATUS://')
@rochacbruno
rochacbruno / ACCESS_ELASTIC.md
Last active May 3, 2024 19:15
Docker-compose wait-to-start

When unsing docker compose you can have a problem with the order of dependent linked containers

The solution is to start a script which tries to access a service and waits until it gets ready before loading your program