Skip to content

Instantly share code, notes, and snippets.

View vanderw's full-sized avatar

vanderwaal vanderw

View GitHub Profile
@vanderw
vanderw / stop_remmina_vim_replace_mode.md
Created March 5, 2026 07:58
How to fix Remmina causing Vim to start auto in Replace mode

Edit ~/.vimrc on remote server

add

set t_u7=

:wq

@vanderw
vanderw / install_redis_on_alma_10.md
Last active March 3, 2026 09:21
How to install Redis on Alma Linux 10

Assuming you are root

dnf update -y
vi /etc/yum.repos.d/redis.repo

add content below

@vanderw
vanderw / encrypt_file.md
Last active March 22, 2025 08:04
File encryption / decryption commands (Better fit linux users)

GnuPG

Heard of that GPG is a "Better alternative" than OpenSSL.

# encryption
# this will prompt you password input & confirm
gpg --output encrypted.data --symmetric --cipher-algo AES256 un_encrypted.data
@vanderw
vanderw / async_wrapper.py
Created December 11, 2024 08:31
Wrap ordinary functions into async style
import asyncio
import time
from concurrent.futures import ThreadPoolExecutor
"""Wrap ordinary func to async style, and catch all console signals"""
def job():
''' Ordinary func to be wrapped '''
time.sleep(5.0)
return 5
@vanderw
vanderw / fabfile.py
Last active October 23, 2024 08:51
python fabric auto deployment
"""
fabfile.py
fabric config file.
It was for simplicity. I personally don't like to extend this script to more complex to config, read, work
usage:
Find `Configurations` part to config by all your needs, maybe code adjustment are also needed.
@vanderw
vanderw / myservice.service
Last active November 8, 2025 08:13 — forked from machiel/myservice.service
systemctl golang service
#/lib/systemd/system/myservice.service
#
# systemctl daemon-reload
# systemctl enable myservice.service
# systemctl start myservice.service
#
[Unit]
Description=Service
ConditionPathExists=/path/to/web/folder
After=network.target