Skip to content

Instantly share code, notes, and snippets.

View gpchelkin's full-sized avatar
🐝
just a human beein'

George Pchelkin gpchelkin

🐝
just a human beein'
View GitHub Profile
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@denguir
denguir / cuda_install.md
Last active May 3, 2024 08:01
Installation procedure for CUDA & cuDNN

How to install CUDA & cuDNN on Ubuntu 22.04

Install NVIDIA drivers

Update & upgrade

sudo apt update && sudo apt upgrade

Remove previous NVIDIA installation

#!/usr/bin/env python3
"""
Downloaded from https://gist.github.com/rams3sh/15ac9487f2b6860988dc5fb967e754aa
Craft a web request to the AWS rest API and hit an endpoint that actually works but isn't supported in the boto3 or AWS CLI
Based on https://gist.github.com/andrewmackett/5f73bdd29aeed4728ecaace53abbe49b
Usage :- python3 rds_log_downloader.py --region <region> --db <db_name> --logfile <log_file_to_download> --output <output_file_path>
@natanlao
natanlao / syncthing-photo-sync.md
Last active May 5, 2024 04:59
Syncing iPhone photos with Syncthing

For those who prefer to avoid solutions like iCloud Photos and Dropbox for backing up photos, you can sync your iPhone photos with Syncthing. To do this, you'll need two things:

  • Möbius Sync is, to my knowledge, the only actively-maintained Syncthing client for iOS. It's free to sync up to 20 MB, and only $4.99 (one-time) to remove that limit.

  • PhotoSync is a nifty iOS app for syncing photos to a number of different destinations. It's free for low-quality

@maxenglander
maxenglander / ebpf-exporter-config.yaml
Last active March 14, 2022 20:37
ebpf_exporter configuration with a program to measure audit_log_start latency
programs:
- name: audit-log-start-latency
metrics:
histograms:
- name: function_latency_seconds
help: Latency of Linux kernel function
table: dist
bucket_type: fixed
bucket_keys:
- 1000 # 1ms
@bykvaadm
bykvaadm / README.md
Last active June 3, 2022 03:45
Postgres patron backup on Minio with prometheus monitoring

Скрипт не претендует на истину первой инстанции

Да, я знаю что есть способ ${the_best_pg_backup_method}

Это просто скрипт которым я поделился - хочешь пользуйся, не хочешь - иди мимо

@rams3sh
rams3sh / rds_log_downloader.py
Last active February 16, 2024 05:19
Basic python script that supports downloading the RDS logs and solves the partial download issue faced in boto and CLI. Issue Ref: https://github.com/aws/aws-cli/issues/2268
"""
Craft a web request to the AWS rest API and hit an endpoint that actually works but isn't supported in the boto3 or AWS CLI
Based on https://gist.github.com/andrewmackett/5f73bdd29aeed4728ecaace53abbe49b
Usage :- python3 rds_log_downloader.py --region <region> --db <db_name> --logfile <log_file_to_download> --output <output_file_path>
Note:-
The above command also supports profile. You can pass profile name using --profile or -p paramater. It's an optional parameter though.
@m-radzikowski
m-radzikowski / script-template.sh
Last active May 4, 2024 04:13
Minimal safe Bash script template - see the article with full description: https://betterdev.blog/minimal-safe-bash-script-template/
#!/usr/bin/env bash
set -Eeuo pipefail
trap cleanup SIGINT SIGTERM ERR EXIT
script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd -P)
usage() {
cat <<EOF
Usage: $(basename "${BASH_SOURCE[0]}") [-h] [-v] [-f] -p param_value arg1 [arg2...]
@gpchelkin
gpchelkin / shadowsocks-rust-server.sh
Last active May 3, 2024 06:38
How to Setup shadowsocks-rust Server with xray-plugin (or v2ray-plugin) on Any Linux Host
#!/usr/bin/env bash
# https://github.com/shadowsocks/shadowsocks-rust/releases
export SSVERSION=v1.18.2
export SSPORT=143
export SSPASSWORD="CHANGEME"
export SSARCHIVE="shadowsocks-${SSVERSION}.x86_64-unknown-linux-gnu.tar.xz"
#export SSARCHIVE="shadowsocks-${SSVERSION}.aarch64-unknown-linux-gnu.tar.xz"
export PREFIX=/usr/local/bin
@probonopd
probonopd / Wayland.md
Last active May 6, 2024 20:28
Think twice about Wayland. It breaks everything!

Think twice before abandoning Xorg. Wayland breaks everything!

Hence, if you are interested in existing applications to "just work" without the need for adjustments, then you may be better off avoiding Wayland.

Wayland solves no issues I have but breaks almost everything I need. Even the most basic, most simple things (like xkill) - in this case with no obvious replacement. And usually it stays broken, because the Wayland folks mostly seem to care about Automotive, Gnome, maybe KDE - and alienating everyone else (e.g., people using just an X11 window manager or something like GNUstep) in the process.

Wayland proponents make it seem like Wayland is "the successor" of Xorg, when in fact it is not. It is merely an incompatible alternative, and not even one that has (nor wants to have) feature parity (missing features). And unlike X11 (the X Window System), Wayland protocol designers actively avoid the concept of "windows" (making up incompr