Skip to content

Instantly share code, notes, and snippets.

View JucaRei's full-sized avatar
:electron:
Focusing

JucaRei

:electron:
Focusing
View GitHub Profile
@alekseysidorov
alekseysidorov / shell.nix
Last active May 27, 2023 04:26
Docker images builder powered by the nixpkgs-cross-overlay
{ localSystem ? builtins.currentSystem
, crossSystem ? { config = "x86_64-unknown-linux-musl"; isStatic = true; useLLVM = true; }
}:
let
# Fetch the nixpkgs-cross-overlay sources.
src = builtins.fetchTarball "https://github.com/alekseysidorov/nixpkgs-cross-overlay/tarball/main";
# Use the nixpkgs revision provided by the overlay.
# This is the best way, as they are the most proven and compatible.
nixpkgs = "${src}/utils/nixpkgs.nix";
# Make cross system packages.
@joshenders
joshenders / openwrt_lxd_multiwan.md
Last active July 30, 2025 18:22
OpenWrt 23.05.x Setup Under LXD 5.x on Debian 12 with PCI Passthrough
@subrezon
subrezon / openwrt-on-proxmox.md
Last active September 27, 2025 22:44
How to set up an OpenWRT VM in Proxmox
  1. Go to OpenWRT release page, select the latest release stable release, then targets -> x86 -> 64. Right-click generic-ext4-combined.img.gz (not the "efi"!) and copy the link.

  2. On the Proxmox host, download the archive and unpack it:

wget *paste link here*
gunzip openwrt-*.img.gz
  1. Resize the image to be the size you want your VM's disk to be (example with 8 GiB):
@coderofsalvation
coderofsalvation / howto rootless podman container connecting to REST api docker.sock.md.md
Last active April 19, 2023 17:05
howto rootless podman container connecting to REST api /var/run/docker.sock

Ok I was struggling a bit finding info about this. In a nutshell:

  • /var/run/docker.sock only works for root(ful) containers
  • there's no rootless socket-file created by default (you need to run an API listener service)

STEP 1: run API listener service (to create socketfile)

# whoami
# To set this up, first get tailscale working in an isolated linux shell:
# 1. sudo systemctl stop tailscaled.service
# 2. tailscaled -port 9993 -state tailscale-luks-setup.state -tun userspace-networking -socket ./tailscaled.sock
# 3. tailscale -socket ./tailscaled.sock up -hostname HOSTNAME-luks
# 4. tailscale -socket ./tailscaled.sock down
# 5. ctrl-c out of tailscaled
# 6 sudo systemctl start tailscaled.service
#
# Then add the .state file to your machine secrets and pass its path as tailscaleStatePath.
@nandordudas
nandordudas / 00-setup.md
Last active April 13, 2025 16:16
Setup WSL 2 on Windows 11

Windows Development Environment Setup Guide

Warning

This is a work in progress.

TODO: fzf, nvm, delta, exiftool

This guide provides step-by-step instructions for setting up a complete development environment on Windows, including WSL, package managers, and essential tools.

Table of Contents

@lacafjh
lacafjh / config.txt
Created July 12, 2022 06:09
YT-DLP configuration
# Do not read configuration files. When given in the global configuration file /etc/youtube-dl.conf:
# Do not read the user configuration in ~/.config/youtube-dl/config (%APPDATA%/youtube-dl/config.txt on Windows)
# --ignore-config
#=========================================General Options==============================================
# Continue on download errors, for example to skip unavailable videos in a playlist
--ignore-errors
@morrolinux
morrolinux / linux-full-desktop-container.md
Last active July 29, 2026 15:58
Run a full linux desktop in a container

In the following gist I'm going to guide you through the process of installing and booting an entire linux distribution with full desktop environment just like you would have with a classical VM, but with much better performance and much worse isolation :)

The reason why I did this was mainly because it's cool, but also to test new distros with decent graphics performance without actually booting them on my PC.

If you "try this at home" just keep in mind a container is not as secure as a VM, and some of the option we're going to explore will weaken container isolation from "a bit risky" to "totally unsafe" depending on what you choose.

Also, we're going to use systemd-nspawn for containers as it's probably the best fit for our use case and can also boot any linux partition without needing to prepare an apposite container image.

Less go!

@jaromil
jaromil / debian-to-devuan-ansible-role.yaml
Created June 17, 2022 09:55
Ansible for the non-interactive migration of Debian 11 "Bullseye" to Devuan 4 "Chimaera"
---
- name: INSTALL DEVUAN
hosts: all
# become: yes
tasks:
- name: Install Devuan keyring
shell: >-
curl https://pkgmaster.devuan.org/devuan/pool/main/d/devuan-keyring/devuan-keyring_2017.10.03_all.deb -o devuankeys.deb && dpkg -i devuankeys.deb
- name: Install sysvinit
@InternetUnexplorer
InternetUnexplorer / command-not-found.sh
Last active March 17, 2024 11:53
Improved home-manager nix-locate configuration, with an auto-updated index and a better command-not-found handler
# Adapted from https://github.com/bennofs/nix-index/blob/master/command-not-found.sh
command_not_found_handle () {
if [ -n "${MC_SID-}" ] || ! [ -t 1 ]; then
>&2 echo "$1: command not found"
return 127
fi
echo -n "searching nix-index..."
ATTRS=$(@nix-locate@ --minimal --no-group --type x --type s --top-level --whole-name --at-root "/bin/$1")