Skip to content

Instantly share code, notes, and snippets.

View rmlandvreugd's full-sized avatar

R. Mathieu Landvreugd rmlandvreugd

View GitHub Profile
@AppleBoiy
AppleBoiy / alias_eza.md
Last active October 28, 2025 16:37
eza-ls

Alias eza for ls command

Put to shell configure file

first install eza by homebrew

brew install eza

Basic setup

@craigloewen-msft
craigloewen-msft / autoMemoryReclaim.sh
Created September 18, 2023 20:01
Auto memory reclaim shell script
#!/bin/bash
# Put under /etc/autoMemoryReclaim.sh
# set variables at the top
low_cpu_usage=50 # Note: We work with integer percentages (e.g., 50%)
idle_time=2 # Minutes
cached_memory_limit=1000 # MB
percent_memory_to_reclaim=5 # Percentage as an integer
wait_period=3
@oleksis
oleksis / Fedora-WSL2.md
Last active March 21, 2024 18:12
Fedora 38 on WSL2 using PowerShell

Fedora 38 x86_64 on WSL2 using PowerShell

Download and import the Fedora base container (Powershell)

$DownloadURL = "https://kojipkgs.fedoraproject.org//packages/Fedora-Container-Base/38/20230801.0/images/Fedora-Container-Base-38-20230801.0.x86_64.tar.xz"
$OutputFile = "$env:USERPROFILE\Downloads\Fedora-Container-Base-38-20230801.0.x86_64.tar.xz"
Invoke-WebRequest -Uri $DownloadURL -OutFile $OutputFile

# Extract the downloaded tarball and move the root file system to the appropriate location
# winget install --id 7zip.7zip
@oleksis
oleksis / Dockerfile
Last active July 18, 2024 07:16
Rancher Desktop, K3s and Traefik ingress controller
FROM nginx:alpine
COPY . /usr/share/nginx/html
@oleksis
oleksis / wsl2- Linux-6.3.md
Last active April 7, 2023 18:43
WSL2 and Custom Linux/x86 Kernel >= v6.3-rc4

WSL2 and Custom Linux/x86 Kernel v6.3-rc4

Follow the Custom Linux/x86 Kernel Configuration for compile the Linux kernel source >= v6.3-rc4 getting this errors:

wsl -d Ubuntu Output:

Catastrophic failure
Error code: Wsl/Service/CreateInstance/CreateVm/ConfigureNetworking/E_UNEXPECTED
Catastrophic failure
@nkhitrov
nkhitrov / structlog_fastapi.py
Created March 16, 2023 00:04
Structlog FastAPI example
"""
Structlog example configuration with FastAPI.
Features:
- async bound logger
- contextvars to log request-id and other meta data
- custom format for default logging loggers and structlog loggers
"""
import asyncio
import logging
@oleksis
oleksis / v1.0.0_wsl2_wslg_display_x0.md
Last active September 8, 2024 09:08
X11 display socket in WSLg

Update to WSL2 v1.0.0

➜ wsl --shutdown
➜ wsl --update --web-download
➜ wsl --version
WSL version: 1.0.0.0
Kernel version: 5.15.74.2
WSLg version: 1.0.47
MSRDC version: 1.2.3575
@bpradipt
bpradipt / ocp410-params.yaml
Last active March 17, 2023 11:10
kcli params for deploying OpenShift 4.10
# Cluster domain
domain: test410.com
# Cluster name
cluster: test
# RHCOS image name in the libvirt storage pool
# You can leave it empty for kcli to download and use the release specific image
# image:
imagecontentsources: []
mdns: True
@sts10
sts10 / rust-command-line-utilities.markdown
Last active October 27, 2025 12:49
A curated list of command-line utilities written in Rust

A curated list of command-line utilities written in Rust

Note: I have moved this list to a proper repository. I'll leave this gist up, but it won't be updated. To submit an idea, open a PR on the repo.

Note that I have not tried all of these personally, and cannot and do not vouch for all of the tools listed here. In most cases, the descriptions here are copied directly from their code repos. Some may have been abandoned. Investigate before installing/using.

The ones I use regularly include: bat, dust, fd, fend, hyperfine, miniserve, ripgrep, just, cargo-audit and cargo-wipe.

  • atuin: "Magical shell history"
  • bandwhich: Terminal bandwidth utilization tool