Skip to content

Instantly share code, notes, and snippets.

View luckylittle's full-sized avatar
:octocat:
Working for @RedHatOfficial

Lucian Maly luckylittle

:octocat:
Working for @RedHatOfficial
View GitHub Profile
@danwilldev
danwilldev / pauseResume.py
Last active April 14, 2025 22:24
A script to pause active torrents when new torrent added. To stop overwhelming of HDDs. Script runs continuously until the initial torrents have ended. Pausing any torrents that start uploading that are not being raced. If new torrents are added afterwards the script exits without resuming torrents as it assumes a new instance will be running an…
#!/usr/bin/env python3
from qbittorrentapi import Client
import sys, time
#----------------CONFIG----------------
catagoriesToExclude = ['autodl-1', 'autodl-2', 'autodl-3']
tagsToExclude = ['tackerName']
uploadSpeedCutOff = 15000000
uploadSpeedCutOffToggle = True
tag = 'Temp Paused'
@waynedovey
waynedovey / gist:37b9a897c83ddd4e178fc1b5f815ea1c
Last active May 13, 2020 04:49
Clean out the Git History if you have checked in a password by mistake
# Feature Branch
git checkout --orphan fixit
git add -A
git commit -m "update"
git branch -D feature/bastion-create
git branch -m feature/bastion-create
git push -f origin feature/bastion-create
git gc --aggressive --prune=all
# Master Branch
@waynedovey
waynedovey / gist:11eb2985a82caef86714d4124b901153
Created September 23, 2019 04:01
OpenShift 4 CheetSheet
# Display currently installed operators and cluster version
oc adm release info
# List the current Operators Status
oc get clusteroperators
# Upgrade from command line
oc adm upgrade
# Remotely connet to the cluster.
oc debug node/ip-10-216-29-190.ap-southeast-2.compute.internal --image=rhel-tools
@ianhomer
ianhomer / curl-ipv4.sh
Last active March 22, 2025 06:45
Force CURL to use ipv4
# curl not smart enough for ipv6, so force ipv4
# on my mac I started to get localhost connect failure
#
# curl: (7) Failed to connect to localhost port 9031: Connection refused
echo '--ipv4' >> ~/.curlrc