Skip to content

Instantly share code, notes, and snippets.

@Ravenstine
Ravenstine / how-to-run-yggdrasil-in-docker.md
Created September 29, 2023 20:48
How To Run Yggdrasil In Docker

How To Run Yggdrasil In Docker

Want to run Yggdrasil in a Docker container? This is how you can do it.

The keys to getting it working are the following:

  • Give the container access to the TUN interface of the host (or the VM guest in the case of Docker Machine or Docker for Mac)
  • Enable IPv6
  • Assign a dedicated MAC address
@theprojectsomething
theprojectsomething / An Ubuntu WiFi Secure Captive Portal.md
Last active January 12, 2026 13:19
Guide: An Ubuntu WiFi Secure Captive Portal: Network Manager / DNSMasq / HA Proxy / Let's Encrypt

An Ubuntu WiFi Secure Captive Portal

Improvements, suggestions & fixes are welcome!

Captive portals can be a pain. Here's an opinionated and no-doubt entirely imperfect guide to setting one up for a WiFi access point on Ubuntu (tested on 20+), utilising Network Manager, DNSMasq, HA Proxy and (optionally) Let's Encrypt for a secure, locally hosted landing page.

_Note: This setup was originally designed for an offline WLAN, providing access to a small number of locally hosted domains ... think the WiFi media portal on a flight or boat. If you are looking to provide internet access behind a captive portal then this guide won't get you all the way there. That said, many routers have this capability built in, as do any number of open source router firmware solutions. So you probably don't need to roll your own. If you'd like to try anyway, Ha Proxy Stick Tables would probably come in handy. Very happy to update the guide with any p

@giuseppe
giuseppe / podman_runc_crun.md
Last active April 10, 2024 22:38
runc vs crun performance

running Podman as root

runc

[root@fedora-s-4vcpu-8gb-fra1-01 ~]# for i in {1..10}; do /usr/bin/time -f%e podman \
    --runtime /usr/bin/runc run --rm alpine true; done 2>&1 | sort
1.10
1.10
1.10
+18553308653;auth_microsoft
+358446150535;marketing_sipnet
+74950211749;marketing_telecom
+74950986849;collector
+74951251177;marketing
+74957556983;marketing_sipnet
+74957558866;marketing
+74957877877;marketing
+74956478683;marketing_finance
+74993009689;marketing
@Titiaiev
Titiaiev / bash-guide-1.md
Last active December 5, 2025 18:37
шпаргалка по написанию bash скриптов, по ссылке - оригинальная статья на хабре

Бесплатная книга-сайт на русском, полный гайд
Advanced Bash-Scripting Guide

Введение

BASH — Bourne-Again SHell (что может переводится как «перерожденный шел», или «Снова шел Борна(создатель sh)»), самый популярный командный интерпретатор в юниксоподобных системах, в особенности в GNU/Linux. Ниже приведу ряд встроенных команд, которые мы будем использовать для создания своих скриптов.

>break выход из цикла for, while или until

@il-katta
il-katta / Dockerfile
Last active December 18, 2025 08:10
script to update katta/openwrt-rootfs docker image
ARG VERSION=latest
FROM docker.io/katta/openwrt-rootfs:$VERSION
RUN mkdir -p /var/lock \
&& mkdir -p /var/run \
&& opkg update \
&& opkg install \
luci \
luci-ssl \
@zentavr
zentavr / Syntax
Last active August 16, 2019 07:16
Syntax files for Midnight Commander editor
# Add to your Syntax file *BEFORE*:
file .\* unknown
include unknown.syntax
# The next lines:
file bgpd\.conf$ BGP\sSyntax
include bgp.syntax
@dmitrykustov
dmitrykustov / upgrade-postgres-9.4-to-9.6.md
Last active September 7, 2025 14:21 — forked from dideler/upgrade-postgres-9.3-to-9.4.md
Upgrading PostgreSQL from 9.4 to 9.6 on Debian Jessie

To use the most modern version of Postgres software we need to add postgresql repository. Edit /etc/apt/sources.list or create /etc/apt/sources.list.d/pgdg.list and add there a line: deb http://apt.postgresql.org/pub/repos/apt/ jessie-pgdg main Then import the repository signing key, and update the package lists:

wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
sudo apt-get update

Install a new version of PostgreSQL server.

Once the Debian upgrade finished, I used dpkg-query -l postgresql* to check which versions of postgres I have installed.

Исходные данные: роутер имеет адрес 192.168.1.1, tor и i2pd подняты на 192.168.1.10 (если роутер достаточно мощный, можно поднять их прямо на нём, соответственно скорректировав адреса)

В LEDE для загрузки списка заблокированных доменов проще всего использовать поставляемую по умолчанию утилиту uclient-fetch. Необходимо лишь добавить ей поддержку SSL:

opkg update
opkg install libustream-mbedtls

Впрочем, вы можете использовать wget или curl, если предпочитаете. Особенности wget см. ниже.

@subfuzion
subfuzion / curl.md
Last active February 21, 2026 17:28
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.