Skip to content

Instantly share code, notes, and snippets.

@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

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

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

opkg update
opkg install libustream-mbedtls

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

@tikolakin
tikolakin / fish_alias.md
Last active May 2, 2024 14:21
Create alias in Fish shell and save this as a permanent function

Directly from CLI

alias x='exit'
funcsave x

or create a file in

~/.config/fish/functions 

with name