This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Crosshair | |
cl_crosshairalpha "255" | |
cl_crosshaircolor "5" | |
cl_crosshaircolor_b "255" | |
cl_crosshaircolor_r "255" | |
cl_crosshaircolor_g "0" | |
cl_crosshairdot "1" | |
cl_crosshairgap "0" | |
cl_crosshairsize "0" | |
cl_crosshairstyle "4" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import sys | |
import threading | |
import argparse | |
import requests | |
import concurrent.futures | |
import logging | |
from urllib.parse import unquote | |
logging.basicConfig(format="%(asctime)s[%(levelname)8s][%(module)s] %(message)s", datefmt="[%m/%d/%Y %H:%M:%S]") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import os | |
import sys | |
from datetime import datetime | |
from uuid import uuid4 | |
out_dir = "/var/log/mail/" + datetime.now().strftime("%Y-%m-%d") + "/" | |
if not os.path.exists(out_dir): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import os | |
import argparse | |
import re | |
import subprocess | |
from typing import Optional, Union | |
parser = argparse.ArgumentParser(description="Calculate or validate md5 sums for each file in a given directory") | |
parser.add_argument("mode", choices=["calculate", "validate"]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Fahrenheit to Celsius | |
// @namespace https://gist.github.com/huwcbjones/a7d24b0a237db9f2f5880e9e477518b8 | |
// @version 0.2.1 | |
// @description Converts Fahrenheit to Celsius | |
// @author huwcbjones | |
// @grant none | |
// @match *://*/* | |
// ==/UserScript== |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Remove "modal-open" | |
// @namespace https://gist.github.com/huwcbjones/86c9f3923a058ca5f0490871e1acebd3 | |
// @version 0.1.2 | |
// @description Remove modal-open from body on window load | |
// @author huwcbjones | |
// @grant none | |
// @match *://*/* | |
// ==/UserScript== |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Stackoverflow Portrait Fixer | |
// @namespace https://gist.github.com/huwcbjones/ed75b853f1a08fbf8ffa353ff1650205 | |
// @version 0.1 | |
// @description Fix portrait view on new stackoverflow layout | |
// @author huwcbjones | |
// @match *://stackoverflow.com/* | |
// @grant none | |
// ==/UserScript== |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def calculate_hy3_sum(line: str) -> int: | |
data = "{:<128}".format(line) # pad to 128 chars | |
odd_sum = sum([ord(data[c]) for c in range(0, len(data), 2)]) # sum odd chars | |
even_sum = sum([ord(data[c]) for c in range(1, len(data), 2)]) # sum even chars | |
checksum = math.trunc((odd_sum + 2 * even_sum) / 21) # add odd + 2 * even, then /21, ignore decimal | |
checksum += 205 # add 205 to result | |
checksum = int(str(checksum)[:-3:-1]) # take last 2 digits of result and reverse | |
return checksum |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
location /.well-known { | |
add_header Last-Modified ""; | |
add_header X-Frame-Options "SAMEORIGIN"; | |
add_header Strict-Transport-Security "max-age=63072000; includeSubDomains; preload"; | |
alias /var/www/html/.well-known; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Generated by iptables-save v1.6.0 on Wed May 22 00:46:27 2019 | |
# GID 111 is debian-transmission on debian-9 | |
*filter | |
:INPUT ACCEPT [9605:9425451] | |
:FORWARD ACCEPT [0:0] | |
:OUTPUT ACCEPT [14265:17182494] | |
# allow out from RPC port on local net (change to your own subnet) | |
-A OUTPUT -d 10.0.0.0/8 -p tcp --sport 9091 -m owner --gid-owner 111 -j ACCEPT |
OlderNewer