This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| set -euo pipefail | |
| if [[ "${1:-}" == "--remote" ]]; then | |
| export DEBIAN_FRONTEND=noninteractive | |
| : "${PUBKEY_B64:?PUBKEY_B64 is required}" | |
| : "${REMOTE_LOGIN_USER:?REMOTE_LOGIN_USER is required}" | |
| USER_HOME="$(getent passwd "$REMOTE_LOGIN_USER" | cut -d: -f6)" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| set -euo pipefail | |
| NAME="${1:-test-vm}" | |
| PASSWORD="${2:-password}" | |
| export LXD_DIR="${LXD_DIR:-/var/lib/lxd}" | |
| command -v lxc >/dev/null || { echo "Missing command: lxc" >&2; exit 1; } | |
| [ -S "$LXD_DIR/unix.socket" ] || { echo "Missing LXD socket: $LXD_DIR/unix.socket" >&2; exit 1; } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Build and run command: docker build . -t yggdrasil && docker run --rm -it --device=/dev/net/tun --privileged yggdrasil -autoconf | |
| FROM debian:trixie-slim AS builder | |
| ENV VERSION=0.5.13 | |
| ENV SOURCE_URL=https://github.com/yggdrasil-network/yggdrasil-go/archive/refs/tags/v${VERSION}.tar.gz | |
| RUN apt-get update -y \ | |
| && apt-get install -y --no-install-recommends wget ca-certificates git golang \ | |
| && go install gopkg.in/niemeyer/godeb.v1/cmd/godeb@latest \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Set terminal title (optional) | |
| PS1="\[\e]0;\u@\h: \w\a\]" | |
| # Segment 1: Dark Gray background (100) with Light Yellow text (93) | |
| PS1+=$'\[\e[100;93m\] \u@\h ' | |
| # Arrow from Segment 1 to Segment 2: | |
| # Arrow's foreground is set to dark gray (90) | |
| # Arrow's background is set to Light Blue (104) | |
| PS1+=$'\[\e[90;104m\]\uE0B0' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| """ | |
| vnc_single_window_wx_xlib_dbus.py | |
| A Python script that: | |
| - Uses python3-xlib (Xlib) to list available windows (plus a "root" option). | |
| - Displays a wxPython GUI (ListBox) of windows. | |
| - On selection, we run x11vnc on that window (passwordless + accept popup). | |
| - Publishes the chosen window name via Avahi (Zeroconf) using python3-dbus instead of avahi-publish-service. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import re | |
| import hashlib | |
| import base58 # pip install base58 | |
| import os | |
| import sys | |
| def hash256(data): | |
| """Perform SHA-256 hash twice.""" | |
| return hashlib.sha256(hashlib.sha256(data).digest()).digest() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/data/data/com.termux/files/usr/bin/python3 | |
| import json | |
| import os | |
| import subprocess | |
| import time | |
| import logging | |
| import signal | |
| # Configuration |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # For users with read-only or otherwise unusable HOME directory | |
| alias www='sudo -u www-data /bin/bash -c "mkdir -p /tmp/$(id -n -u)-home && cd /tmp/$(id -n -u)-home && (test -e realhome || ln -s $(getent passwd www-data|cut -d':' -f6) realhome) && HOME=/tmp/$(id -n -u)-home exec /bin/bash -l"' | |
| # For users with writable HOME | |
| alias uuu='cd $(getent passwd www-data|cut -d':' -f6) && sudo -u www-data -s /bin/bash' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ==UserScript== | |
| // @name flibusta.is качать с названием | |
| // @namespace Violentmonkey Scripts | |
| // @match *://flibusta.is/a/* | |
| // @match *://flibusta.is/s/* | |
| // @match *://flibusta.is/sequence/* | |
| // @grant GM_setClipboard | |
| // @grant GM_download | |
| // @version 1.4 | |
| // @author - |
NewerOlder