Skip to content

Instantly share code, notes, and snippets.

@0xmilan
0xmilan / check_load_time.py
Created February 24, 2018 17:50
Check download time for HEAD and GET requests for the linuxmint/mintinstall reviews list.
#!/usr/bin/python3
import urllib.request
import time
import os
url = "https://community.linuxmint.com/data/new-reviews.list"
CACHE_DIR = os.path.expanduser("~/")
reviews_path_tmp = os.path.join(CACHE_DIR, "reviews.list.tmp")
@0xmilan
0xmilan / pholling.py
Last active February 18, 2018 15:40
Push notifier for new (private) messages on the PROHARDVER! forums (prohardver.hu)
#!/usr/bin/python
# -*- coding: utf8 -*-
import urllib2, json, subprocess, gzip
from time import sleep
from StringIO import StringIO
def parse():
num = int(item["msgs"]) - item["read_msgs"]
if num > 0:
subprocess.call(["notify-send", item["title"] , str(num) + " új hozzászólás", "-t" , "5000"])