Skip to content

Instantly share code, notes, and snippets.

View Red-Eyed's full-sized avatar

Vadym Stupakov Red-Eyed

View GitHub Profile
@Red-Eyed
Red-Eyed / 0-install-deluge-python.sh
Last active May 22, 2022 15:06
Install deluge-web (used for raspberry pi)
# To use geoip
sudo apt install geoip-database libgeoip-dev
py_ver=`python -c "from sys import version_info as vi; print(f'{vi[0]}.{vi[1]}')"`
sudo apt install python${py_ver}-venv
pip install pipx
pipx install deluge
pipx inject deluge libtorrent GeoIP
@Red-Eyed
Red-Eyed / !Android debloat.md
Last active December 18, 2022 14:27
Android debloat

Usefull commands

Get current ativity: dumpsys activity activities | grep mResumedActivity

Uninstall app example: pm uninstall -k --user 0 com.aura.oobe.samsung.gl

Restore removed app example: pm install-existing com.aura.oobe.samsung.gl

@Red-Eyed
Red-Eyed / .gitconfig
Last active May 9, 2025 05:38
git and ssh accounts
[includeIf "gitdir:~/Projects/work/"]
path = .gitconfig_job
[includeIf "gitdir:~/Projects/personal/"]
path = .gitconfig_personal
[pull]
rebase = false
[filter "lfs"]
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
@Red-Eyed
Red-Eyed / ssh-copy-id.bat
Last active December 18, 2022 14:25
ssh-copy-id for windows
type ~/.ssh/id_rsa.pub | ssh USER@HOST "mkdir -p ~/.ssh && LANG=C sed 's/[\d128-\d255]//g' >> ~/.ssh/authorized_keys && chmod 0600 ~/.ssh/authorized_keys"
@Red-Eyed
Red-Eyed / ssh_scanner.py
Last active March 20, 2022 06:06
ssh scanner
from argparse import ArgumentParser
from concurrent.futures import ThreadPoolExecutor
from ipaddress import ip_network
import socket
try:
from paramiko import SSHClient
except ModuleNotFoundError:
from subprocess import run
import sys
@Red-Eyed
Red-Eyed / pytorch avx benchmark.ipynb
Last active November 8, 2021 20:08
pytorch benchmarks AVX512
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Red-Eyed
Red-Eyed / smb.conf
Last active May 26, 2021 05:26
Windows 10 connect to ubuntu over samba
[global]
workgroup = WORKGROUP
server string = %h server (Samba, Ubuntu)
passdb backend = tdbsam
security = user
[public]
comment = MY_PASSPORT
path = /mnt/MY_PASSPORT/data/
browsable = yes
create mask = 0660
@Red-Eyed
Red-Eyed / dataclass_from_dict.py
Created March 18, 2021 13:55 — forked from gatopeich/dataclass_from_dict.py
Python 3.7 dataclass to/from dict/json
from dataclasses import dataclass, fields as datafields
from ujson import dumps, loads
# Note: ujson seamlessly serializes dataclasses, unlike stdlib's json
@dataclass
class Point:
x: float
y: float
# Shallow dataclass can be rebuilt from dict/json:
@Red-Eyed
Red-Eyed / ffmpeg-compress-mp4
Created January 14, 2021 21:51 — forked from lukehedger/ffmpeg-compress-mp4
Compress mp4 using FFMPEG
$ ffmpeg -i input.mp4 -vcodec h264 -acodec mp2 output.mp4
@Red-Eyed
Red-Eyed / 1. kill_vlc_on_resume.service
Last active December 18, 2022 14:25
kill vlc after suspend
[Unit]
Description=Kills VLC on resume in order to fix logging spam
[Service]
Type=oneshot
ExecStart=-/usr/bin/killall vlc
TimeoutSec=0
StandardOutput=syslog
After=suspend.target