Skip to content

Instantly share code, notes, and snippets.

View aslafy-z's full-sized avatar
👻

Zadkiel AHARONIAN aslafy-z

👻
View GitHub Profile
apiVersion: apps/v1
kind: Deployment
metadata:
name: echo-headers
labels:
app: echo-headers
spec:
replicas: 2
selector:
matchLabels:
@aslafy-z
aslafy-z / scw_lister.go
Last active June 6, 2025 16:22
List all Scaleway resources in an organization
package main
import (
"bytes"
"encoding/json"
"flag"
"fmt"
"os"
"os/exec"
"regexp"
@aslafy-z
aslafy-z / -jenkins-sticky-sidebar.css
Created June 3, 2025 09:11
Jenkins Sticky Sidebar
#tasks {
position: sticky;
top: 0;
z-index: 1000;
padding-top: 5em;
box-shadow: 2px 0 5px rgba(0,0,0,0.1);
}
@aslafy-z
aslafy-z / -strace-static.md
Last active May 15, 2025 13:16
strace static built from https://github.com/strace/strace at 0e203584f5da4cfd2c8b6ea0e0ba617edf0f0deb
git clone https://github.com/strace/strace
cd strace
./bootstrap
export LDFLAGS='-static -pthread'
./configure
make
@aslafy-z
aslafy-z / _sort_-V_without_-V.sh
Last active March 20, 2025 17:23
`sort -V` with sort versions that have no `-V`. Source https://stackoverflow.com/a/23993452/4266494.
sed -Ee 's/^([0-9.]+)$/\1.-1/' | sort -t. -n -k1,1 -k2,2 -k3,3 -k4,4 | rev | cut -d. -f2- | rev
@aslafy-z
aslafy-z / -svg-auto-square-fit-download-bookmarklet.md
Last active March 13, 2025 10:20
SVG Auto-Square-Fit & Download Bookmarklet

SVG Auto-Square-Fit & Download Bookmarklet

This convenient bookmarklet automatically adjusts an SVG file loaded directly in the browser to be centered in a square viewBox, adds a configurable margin around the content, and initiates a quick download of the modified SVG.

🚀 Usage

  • Open a standalone SVG file directly in your browser.
  • Click the bookmarklet.
  • When prompted, enter your desired margin in pixels.
  • The modified SVG will be downloaded automatically, named after your original file.
@aslafy-z
aslafy-z / helm-compare.sh
Last active April 11, 2025 11:48
Script that compares two Helm charts from various sources (local path, local tarball, remote tarball, Git repository, Helm repository, OCI registry)
#!/bin/sh
set -e
# Function to display usage information
usage() {
echo "Helm Chart Comparison Tool"
echo
echo "This script compares two Helm charts from various sources (local, tarball, Git, OCI)."
echo
@aslafy-z
aslafy-z / opencv-python-with-gstreamer-on-windows.md
Last active January 29, 2025 10:01
Build opencv-python with Gstreamer support on Windows
function loadResource(type, sources) {
let index = 0;
function tryLoad() {
if (index >= sources.length) {
console.error(`${type.toUpperCase()} load failed.`);
return;
}
let el = type === 'js' ? document.createElement('script') : document.createElement('link');
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.