Skip to content

Instantly share code, notes, and snippets.

View amurgit's full-sized avatar

Kolupaev Aleksei amurgit

  • Shenzhen
View GitHub Profile
@amurgit
amurgit / Python WExpect
Created April 15, 2025 02:35 — forked from anthonyeden/Python WExpect
Python's PExpect for Microsoft Windows: WExpect
"""Pexpect is a Python module for spawning child applications and controlling
them automatically. Pexpect can be used for automating interactive applications
such as ssh, ftp, passwd, telnet, etc. It can be used to a automate setup
scripts for duplicating software package installations on different servers. It
can be used for automated software testing. Pexpect is in the spirit of Don
Libes' Expect, but Pexpect is pure Python. Other Expect-like modules for Python
require TCL and Expect or require C extensions to be compiled. Pexpect does not
use C, Expect, or TCL extensions. It should work on any platform that supports
the standard Python pty module. The Pexpect interface focuses on ease of use so
that simple tasks are easy.
@amurgit
amurgit / wgs.sh
Created October 25, 2023 08:45
Add client name to "wg show" command
#!/bin/bash
# This script adds client name to "wg show" output
# Create tmp file
tmp_file=$(mktemp tmp-wg-out-XXXXXX.log)
# Get colored output from original "wg show" command into file
script --return --quiet --log-out "/dev/null" --command "wg show" --echo never >$tmp_file
# Array to store ip<->client_name asscociation
@amurgit
amurgit / AdbCommands
Created July 8, 2023 11:05 — forked from Pulimet/AdbCommands
Adb useful commands list
adb help // List all comands
== Adb Server
adb kill-server
adb start-server
== Adb Reboot
adb reboot
adb reboot recovery
adb reboot-bootloader
@amurgit
amurgit / n_shades_of_gray_video_generator.sh
Last active April 25, 2023 06:46
N shades of gray - video generator (using ffmpeg)
#!/bin/sh
set -euo pipefail
# Check if FFmpeg is installed and display an error message if not
if ! [ -x "$(command -v ffmpeg)" ]; then
echo 'Error: FFmpeg is not installed.' >&2
exit 1
fi
@amurgit
amurgit / tmux.conf
Last active January 29, 2023 04:23 — forked from christianparpart/tmux.conf
tmux configuration file for ex-screen users
# Use screen-like key bindings
unbind C-b
set -g prefix C-a
bind C-a send-prefix
# Use screen-like window switching
bind-key k select-pane -U
bind-key j select-pane -D
bind-key h select-pane -L
bind-key l select-pane -R
@amurgit
amurgit / flv.py
Last active May 7, 2017 14:53 — forked from fvicente/flv.py
Extracting FLV meta tags with Python
from struct import unpack
from datetime import datetime
class FLVReader(dict):
"""
Reads metadata from FLV files
"""
# Tag types