Skip to content

Instantly share code, notes, and snippets.

@scratchmex
scratchmex / qbit_fetchcontent.patch
Last active May 15, 2025 17:50
patch to qbittorrent for building with cmake fetchcontent so that you don't need to build dependencies yourself
diff --git a/cmake/Modules/CheckPackages.cmake b/cmake/Modules/CheckPackages.cmake
index 6c85b8d11..f92bb4482 100644
--- a/cmake/Modules/CheckPackages.cmake
+++ b/cmake/Modules/CheckPackages.cmake
@@ -1,6 +1,33 @@
# use CONFIG mode first in find_package
set(CMAKE_FIND_PACKAGE_PREFER_CONFIG ON)
+
+include(FetchContent)

Keybase proof

I hereby claim:

  • I am scratchmex on github.
  • I am ivangonzalez1107 (https://keybase.io/ivangonzalez1107) on keybase.
  • I have a public key whose fingerprint is 9400 E7A5 64E7 E7EF 192A F362 24B2 CB05 89E8 C553

To claim this, I am signing this object:

@scratchmex
scratchmex / capicua.py
Last active October 10, 2017 03:31
Check if a number is capicúa and if not, add its palindrome and check it again until n iterations given.
#!/usr/bin/env python3
from time import time as time
#Made by Ivan Gonzalez https://github.com/scratchmex (05/09/2017)
#Use python3
def reverse_number(n):
n = str(n)
return int(''.join([n[-i-1] for i in range(len(n))]))
def is_capicua(n):
n = str(n)
@scratchmex
scratchmex / quadratic-solver.py
Created August 13, 2017 23:39
Quadratic equation solver in Python
# Written by Ivan Gonzalez (2017)
from math import sqrt, fmod
def mcd(a, b, *args):
a, b = abs(a), abs(b)
if a<b:
a, b = b, a
while b:
a, b = b, fmod(a,b)
if args:
@scratchmex
scratchmex / crawler.py
Last active June 24, 2019 08:48
Search and download top chart songs
from bs4 import BeautifulSoup
import urllib2, pickle, re
def read_url_soup(url):
return BeautifulSoup(urllib2.urlopen(url), 'html.parser')
####.read()
def save_pickle(data, filename, open_method='r'):
try:
with open(filename, open_method) as f:
@scratchmex
scratchmex / mailfetch.py
Last active June 24, 2019 08:49
Download, organize and search logs
import email
import imaplib
import os
class FetchEmail():
connection = None
error = None
def __init__(self, mail_server, username, password):
self.connection = imaplib.IMAP4_SSL(mail_server)