Skip to content

Instantly share code, notes, and snippets.

View SlashGordon's full-sized avatar
🤘
Python rocks!

Slash Gordon SlashGordon

🤘
Python rocks!
View GitHub Profile
@SlashGordon
SlashGordon / mkv.sh
Created October 24, 2024 11:15
makeMKV
sudo xattr -d com.apple.quarantine /Applications/MakeMKV.app
sudo /Applications/MakeMKV.app/Contents/MacOS/makemkv
@SlashGordon
SlashGordon / spotify-downloader.py
Last active October 8, 2024 22:08
Spotify Album downloader
# Required packages:
# pip install pydub
# pip install votify
# install ffmpeg
import subprocess
import os
from pydub import AudioSegment
import spotipy
from spotipy.oauth2 import SpotifyClientCredentials
@SlashGordon
SlashGordon / user-data.ts
Created July 23, 2024 08:59
add userdata in front of existing lib generated userdata
private configureUserData(): void {
const asgUserdata = this.agent.autoScalingGroup[
"userData"
] as MultipartUserData;
const waitYumLock = `while [ -f /var/run/yum.pid ]; do echo "Waiting for yum lock..."; sleep 5; done`;
const multiUserData = new MultipartUserData();
var yumWaitUserData: UserData = UserData.forLinux({
shebang: "#!/bin/bash -e",
});
@SlashGordon
SlashGordon / gist:d4b75f6c49a030c4a3e6019f3e9524cc
Created April 12, 2024 11:06
use poetry project with vscode
poetry config virtualenvs.in-project true
poetry env use python
@SlashGordon
SlashGordon / gist:ce78034dd636a3fcc569351c03b672ca
Created April 10, 2024 15:17
“MakeMKV” cannot be opened because the developer cannot be verified.
sudo spctl --master-disable
@SlashGordon
SlashGordon / get_best_vpn_servers.sh
Created January 30, 2024 09:09
Get recommended NordVPN servers from different countries
# Get best UDP OpenVPN servers from Poland, Czech Republic, Romania and Hungary
for id in 174 57 179 98; do curl --silent --retry 3 --connect-timeout 3 --max-time 6 --retry-delay 1 --retry-all-errors "https://nordvpn.com/wp-admin/admin-ajax.php?action=servers_recommendations&filters=\{\"country_id\":$id,\"servers_groups\":\[11\],\"servers_technologies\":\[3\]\}" | jq --raw-output '.[].station'; done
@SlashGordon
SlashGordon / sysctl.conf
Created August 23, 2022 08:51 — forked from bugcy013/sysctl.conf
sysctl.conf
Linux sysctl.conf setting changes:
# Technologies suggested buffer settings
net.core.rmem_max = 16777216
net.core.wmem_max = 16777216
net.core.rmem_default = 8388608
net.core.wmem_default = 8388608
net.core.netdev_max_backlog = 3145728
net.ipv4.tcp_window_scaling = 0
net.ipv4.route.secret_interval = 86400
net.ipv4.tcp_rmem = 262144 4194304 16777216
@SlashGordon
SlashGordon / ecr_docker_login.sh
Created July 23, 2021 12:01
ECR Docker login with named profile
#!/bin/bash
eval $(AWS_SHARED_CREDENTIALS_FILE=${path_to_cred} aws --profile ${profile} --region ${region} ecr get-login-password)
@SlashGordon
SlashGordon / sync_files.sh
Created September 25, 2020 08:23
scp upload/download
# upload file to server
scp my_file user@server://home/user/my_file
# download from server
scp user@server://home/user/my_file my_file
pipenv install # cd to project and insatll environment
pipenv install --python 3.6 # cd to project and insatll environment with specific python version
pipenv shell # like source .venv/bin/activate
pipenv --rm # cd to project an removes environment