Skip to content

Instantly share code, notes, and snippets.

View click0's full-sized avatar

Vladyslav V. Prodan click0

View GitHub Profile
@click0
click0 / rc.upgrade
Last active January 16, 2025 15:55
Readme.md
reboot -r для этого необязателен, а вот для чего он обязателен, у меня тоже есть тесткейс
то есть был
Фряха в виде nanobsd на 8-мегабайтном флеше с загрузчиком U-Boot, перепрошивка без консоли по сети
md формируется в RAM (в моём случае было 128M RAM), reboot -r, на md стартует кастомный /etc/rc, который качает по сети на md новый образ, льет его во флеш и делает полный ребут
Рабочий код для этого http://www.grosbein.net/freebsd/mips/upgrade/
скрипт upgrade подготавливает md
скрипт rc.upgrade это и есть кастомный /etc/rc на md
https://lists.freebsd.org/pipermail/freebsd-mips/2016-February/004431.html
@click0
click0 / Firefox_extensions_list.txt
Last active January 12, 2025 10:14
List of extensions in Firefox
AdNauseam
BlockTube
LastPass
OneTab
Reader
Simple Translate
Stackovershits
Tab Session Manager
TamperMonkey
To Google Translate
@click0
click0 / gist:ac1434c43a23b4503dcc554a96a55ab7
Created December 25, 2024 23:47
Создание сайта из Markdown файлов: полное руководство
# Создание сайта из Markdown файлов: полное руководство
## Содержание
- [GitHub Pages + Jekyll](#github-pages--jekyll)
- [MkDocs](#mkdocs)
- [Docusaurus](#docusaurus)
- [Размещение на GitHub](#размещение-на-github)
## GitHub Pages + Jekyll
@click0
click0 / script-SA-24:04-openssh-13.2.patch.sh
Last active July 5, 2024 15:43
Патчи в FreeBSD-SA-24:04.openssh для разных веток FreeBSD
#!/bin/sh
# License:
# Public Domain
# Author:
# Eugene Grosbein
# Description:
# Пользователям stable, чтобы не пересобирать мир для исправления FreeBSD-SA-24:04.openssh
@click0
click0 / Example_microsocks_stunnel_freebsd_config.md
Last active August 12, 2023 00:34 — forked from daemonhorn/Example_microsocks_stunnel_freebsd_config.md
Socks5 using Microsocks and Stunnel on FreeBSD

Socks5 proxy using Microsocks and Stunnel on FreeBSD

Configuration information for the Microsocks package on FreeBSD as the existing documentation does not give sufficient details to create a secure configuration flexible enough to use for various use cases. See https://github.com/rofl0r/microsocks for the latest source code and wiki documentation. Note: The user authentication method supported by Microsocks is only plaintext, and is not protected by any layer of encryption. Please be hyper aware and use other layers of protection to secure your socks5 endpoint. (Firewall + TLS encryption with client authentication using something like stunnel).

  • If you want an easy way of doing this, just look at ssh -D localhost:1080 <user@host> instead since SSH provides a native Socks5 tunnel with encryption.
  • You can also use stunnel in socks5 protocol mode without Microsocks since it has native support for protocol = socks. See stunnel documentation here: https://www.stunnel.org/static/stunnel
@click0
click0 / image-build.sh
Created August 1, 2023 13:25 — forked from HackingGate/image-build.sh
upgrade ipk on OpenWrt
VERSION=19.07.7
# Download imagebuilder for R7800.
aria2c -c -x4 -s4 https://downloads.openwrt.org/releases/${VERSION}/targets/ipq806x/generic/openwrt-imagebuilder-${VERSION}-ipq806x-generic.Linux-x86_64.tar.xz
# Extract & remove used file & cd to the directory
tar -xvf openwrt-imagebuilder-${VERSION}-ipq806x-generic.Linux-x86_64.tar.xz
rm openwrt-imagebuilder-${VERSION}-ipq806x-generic.Linux-x86_64.tar.xz
cd openwrt-imagebuilder-${VERSION}-ipq806x-generic.Linux-x86_64/
@click0
click0 / wipe_disk_linux.sh
Created November 19, 2022 10:19
HDD or SSD Disk Cleanup
#!/bin/sh
# HDD or SSD Disk Cleanup
# Debian
disk_list=sda100
disk_list=$(grep -E "nvme[0-9]+n[0-9]$|[hsv]d[a-z]$" /proc/partitions | awk '{print $4;}' | sed ':a;N;$!ba;s/\n/ /g')
for disk in ${disk_list}; do
@click0
click0 / nginx.conf
Created March 9, 2022 23:09 — forked from mikoim/nginx.conf
Split RTMP Stream with nginx-rtmp-module
worker_processes 1;
events {
worker_connections 1024;
}
rtmp {
server {
listen 1935;
chunk_size 8192;
@click0
click0 / factorio_blueprint_string_edit.py
Created February 10, 2021 04:23 — forked from Bilka2/factorio_blueprint_string_edit.py
Decode a Factorio blueprint string, change some of it and reencode it
import json
import zlib
import base64
original_bp_string = '0eNp9j80OgjAQhN9lzq0RFNC+ijGGnw1uQhdCi5GQvrstXjx5m9mfb2c3NMNC08ziYTZwO4qDuW1w3Es9pJpfJ4IBe7JQkNomVztHthlYem3r9slCOkdQYOnoDZOFuwKJZ8/05e1mfchiG5rjwH+SwjS6uDxKShCB+nQoFNYoskOR7sQ0LvWmeeyW1vMr0rWNeiB9gslDSrBnNj8vKrxodjs2v2Tn6nytyio7lkUZwgd0Blhx'
bp_json = json.loads(zlib.decompress(base64.b64decode(original_bp_string[1:])).decode('utf8'))
# there is one entity in the blueprint, it's an assembler with a item request for 2 prod-3 modules and no recipe set
# for the fields of the blueprint json see https://wiki.factorio.com/Blueprint_string_format
bp_json['blueprint']['entities'][0]['items'] = {'copper-plate': 200} # overwrites existing item request
@click0
click0 / repairsqlite.sh
Created August 2, 2020 00:10 — forked from sarim/repairsqlite.sh
Sqlite db repair script
#!/bin/bash
DBSTATUS=$(sqlite3 "$1" "PRAGMA integrity_check")
if [ "$DBSTATUS" == "ok" ] ; then
echo DB ALREADY OK
else
echo FIXING CORRUPT DB
TMPDB=$(mktemp -t sarim)
echo ".mode insert
.dump" | sqlite3 "$1" > $TMPDB