Skip to content

Instantly share code, notes, and snippets.

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

JucaRei

:electron:
Focusing
View GitHub Profile
@jamietre
jamietre / docker-compose.yml
Last active May 22, 2025 10:47
Script to start WSL and bind localhost to WSL IP
# Example docker-compose.yml for plex.
version: "2"
services:
plex:
image: plexinc/pms-docker:plexpass
runtime: nvidia
container_name: "plex"
restart: always
hostname: "MY-PLEX"
volumes:
@zamnuts
zamnuts / yt-dlp-all
Created November 27, 2021 06:54
yt-dlp playlist concurrent downloader
#!/usr/bin/env zsh
playlistUrl="$1";
numParallelDownloads="${2:-5}";
numParallelFragments="${3:-5}";
[[ -z "$playlistUrl" ]] && echo 'i need a url to a yt playlist please.' >&2 && exit 1;
[[ "$numParallelDownloads" =~ '^[^0-9]+$' ]] && echo "expected parameter 2 to be the number of parallel downloads, got '$numParallelDownloads'." >&2 && exit 1;
[[ "$numParallelFragments" =~ '^[^0-9]+$' ]] && echo "expected parameter 3 to be the number of parallel fragments, got '$numParallelFragments'." >&2 && exit 1;
@mikroskeem
mikroskeem / docker-network-ns.nix
Last active October 27, 2023 06:33
Stay using nftables in combination with Docker, and set up separate network namespace to make it happy.
{ pkgs, ... }:
# Based on https://wiki.archlinux.org/title/Nftables#Working_with_Docker
let
dockerHostName = "dockernet";
hostip = "${pkgs.util-linux}/bin/nsenter --target 1 --net -- ${ip}";
ip = "${pkgs.iproute2}/bin/ip";
dockerNsSetupScript = pkgs.writeShellScript "docker-netns-setup" ''
@gdamjan
gdamjan / README.md
Last active November 19, 2024 12:20
Install a NixOS for a systemd-nspawn container … from podman

Install

Run a nix container with podman, with the container destination mounted as /mnt:

DEST=~/containers/nixos
mkdir -p $DEST/{dev,proc,etc/nixos}

podman run -v $DEST:/mnt -it --rm --cap-add SYS_ADMIN docker.io/nixos/nix:latest
@thiagokokada
thiagokokada / LEIAME.md
Last active July 3, 2025 01:16
[Vivo Fibra] Usando RTF3507VW-N1 em modo bridge

[Vivo Fibra] Usando RTF3507VW-N1 em modo bridge

Por que usar o RTF3507VW-N1 em modo bridge?

O roteador Askey RTF3507VW-N1 fornecido pela Vivo tem vários problemas:

  • Existe um cache interno de DNS (usando o dnsmasq?) bugado: ao fazer a mesma requisição DNS duas vezes seguidas, a primeira resposta vem correta, porém na seguinte temos:
@vncsna
vncsna / bash_strict_mode.md
Created June 6, 2021 01:59 — forked from mohanpedala/bash_strict_mode.md
set -e, -u, -o, -x pipefail explanation

set -e, -u, -o, -x pipefail

The set lines

  • These lines deliberately cause your script to fail. Wait, what? Believe me, this is a good thing.
  • With these settings, certain common errors will cause the script to immediately fail, explicitly and loudly. Otherwise, you can get hidden bugs that are discovered only when they blow up in production.
  • set -euxo pipefail is short for:
set -e
set -u
@Lissy93
Lissy93 / Example 1 - Getting Started - conf.yml
Last active June 19, 2025 18:58
Example Config Files for Dashy
---
# Page meta info, like heading, footer text and nav links
pageInfo:
title: Dashy
description: Welcome to your new dashboard!
navLinks:
- title: GitHub
path: https://github.com/Lissy93/dashy
- title: Documentation
path: https://dashy.to/docs
@FreddieOliveira
FreddieOliveira / docker.md
Last active July 2, 2025 12:56
This tutorial shows how to run docker natively on Android, without VMs and chroot.

Docker on Android 🐋📱

Edit 🎉

All packages, except for Tini have been added to termux-root. To install them, simply pkg install root-repo && pkg install docker. This will install the whole docker suite, left only Tini to be compiled manually.


Summary

@unrooted
unrooted / initSystemsCheatSheet.md
Created December 31, 2020 11:58
init systems cheat sheet

Manage services in systemd, openRC and runit

systemd

  • list all services: systemctl list-unit-files
  • list running services status: systemctl list-units
  • list failed services: systemctl --failed
  • list available services: systemctl --all
  • start a service: systemctl start [SERVICE_NAME]
  • stop a service: systemctl stop [SERVICE_NAME]