Skip to content

Instantly share code, notes, and snippets.

@raksa
raksa / ssh-config
Created August 7, 2021 15:52
SSH config
Host github.com
HostName github.com
User git
IdentityFile ~/.ssh/secret.key
@raksa
raksa / build-python.sh
Last active November 8, 2025 17:28
Build and install Python from source, on Unix like systems, to a custom location
#!/bin/bash
set -ex
# Usage: ./build-python.sh [version] [install-dir]
# Example1: ./build-python.sh 3.12.9
# Example2: mkdir -p ~/bin/python-original && ./build-python.sh 3.12.9 ~/bin/python-original
# Some modules require extra lib: libffi, libbz2, liblzma
py_version=${1:-3.12.9}
base_dir=$(realpath ${2:-$HOME/bin/python-original})
@raksa
raksa / dl-vid.sh
Last active May 10, 2025 21:39
Download any vide from url
#!/bin/bash
set -ex
# Python and ffmpeg are required, make sure Python 3.10+ is installed
# Usage: ./dl-vid.sh <video_url>
ensure_lib() {
if [ -x "$(command -v apt)" ]; then
if dpkg -s $1 &> /dev/null; then
echo "$1 is already installed"