This is an OpenPGP proof that connects my OpenPGP key to this Github account. For details check out https://keyoxide.org/guides/openpgp-proofs
[Verifying my OpenPGP key: openpgp4fpr:4AF679D0ABA0ED4B07BF7B6932CA3267C8D187D7]
| cat access.log access.log.1 | grep '/t.json' | awk '{print $1}' | sort | uniq | xargs -L1 -I % curl "https://freegeoip.app/json/%" | tee -a ~/log.log |
| #!/bin/bash | |
| # Note: an empty json file at old_ver.json should exist before running this | |
| cd "$(dirname "$0")" | |
| nvchecker -l error -c nvchecker.toml | |
| VAR="`nvcmp -c nvchecker.toml`" | |
| url="https://gotify.example.com" | |
| token="A123ABC.DEF" |
| #!/bin/bash | |
| SERVER_NAME="STATUS" | |
| URL="https://status.malhotra.cc" | |
| TIMEOUT=10 | |
| GOTIFYURL="https://gotify.example.com" | |
| GOTIFY_TOKEN="token" | |
| PRIORITY=9 | |
| STATUS=$(curl -m $TIMEOUT "$URL" -w "%{http_code}\\n" -I -o /dev/null 2>/dev/null) |
| Traceback (most recent call last): | |
| File "/home/karmanyaahm/Documents/code/other/server/google_classroom/.venv/lib/python3.8/site-packages/flask/app.py", line 2464, in __call__ | |
| return self.wsgi_app(environ, start_response) | |
| File "/home/karmanyaahm/Documents/code/other/server/google_classroom/.venv/lib/python3.8/site-packages/flask_behind_proxy.py", line 25, in __call__ | |
| return self.app(environ, start_response) | |
| File "/home/karmanyaahm/Documents/code/other/server/google_classroom/.venv/lib/python3.8/site-packages/flask/app.py", line 2450, in wsgi_app | |
| response = self.handle_exception(e) | |
| File "/home/karmanyaahm/Documents/code/other/server/google_classroom/.venv/lib/python3.8/site-packages/flask/app.py", line 1867, in handle_exception | |
| reraise(exc_type, exc_value, tb) | |
| File "/home/karmanyaahm/Documents/code/other/server/google_classroom/.venv/lib/python3.8/site-packages/flask/_compat.py", line 39, in reraise |
| ##it took me hours to find what I wanted in between deprecated APIs and lacking documentation as of Oct 2020, hopefully this'll help someone | |
| import requests | |
| creds = google.oauth2.credentials.Credentials ###not real thing, replace with the credentials you got from the flow | |
| url = 'https://openidconnect.googleapis.com/v1/userinfo' | |
| head = { 'Authorization': 'Bearer '+creds.token} | |
| response = requests.get(url, headers=head) | |
| print(response.json()['sub']) |
This is an OpenPGP proof that connects my OpenPGP key to this Github account. For details check out https://keyoxide.org/guides/openpgp-proofs
[Verifying my OpenPGP key: openpgp4fpr:4AF679D0ABA0ED4B07BF7B6932CA3267C8D187D7]
| #it stops once because of python recursion limits but can be manually restarted | |
| #it extracts files and then moves them to one directory so the filename doesn't get too long(which is not supported in some tools like bzip) | |
| from xtract import xtract | |
| import os | |
| import glob | |
| # def names(): | |
| def delempty(dirr): | |
| for i in [f[0] for f in os.walk(dirr) if os.path.isdir(f[0])]: |
| #!/bin/bash | |
| #input hdmi,analog, or check | |
| #you will probably have to change the specific values with information from `pacmd list-cards` before it works for your setup | |
| #I am using this script with https://store.kde.org/p/1297839 | |
| CARDID="9d71" | |
| INP=$1 |
| import os | |
| def getdirs(): | |
| return [f.path for f in os.scandir('.') if f.is_dir()] | |
| def delempty(dir): | |
| for i in [f[0] for f in os.walk(dir) if os.path.isdir(f[0])]: | |
| try: |
| 2, 3, 5, 7, 11, 101, 131, 151, 181, 191, 313, 353, 373, 383, 727, 757, 787, 797, 919, 929, 10301, 10501, 10601, 11311, 11411, 12421, 12721, 12821, 13331, 13831, 13931, 14341, 14741, 15451, 15551, 16061, 16361, 16561, 16661, 17471, 17971, 18181, 18481, 19391, 19891, 19991, 30103, 30203, 30403, 30703, 30803, 31013, 31513, 32323, 32423, 33533, 34543, 34843, 35053, 35153, 35353, 35753, 36263, 36563, 37273, 37573, 38083, 38183, 38783, 39293, 70207, 70507, 70607, 71317, 71917, 72227, 72727, 73037, 73237, 73637, 74047, 74747, 75557, 76367, 76667, 77377, 77477, 77977, 78487, 78787, 78887, 79397, 79697, 79997, 90709, 91019, 93139, 93239, 93739, 94049, 94349, 94649, 94849, 94949, 95959, 96269, 96469, 96769, 97379, 97579, 97879, 98389, 98689, 1003001,1008001,1022201,1028201,1035301,1043401,1055501,1062601,1065601,1074701,1082801,1085801,1092901,1093901,1114111,1117111,1120211,1123211,1126211,1129211,1134311,1145411,1150511,1153511,1160611,1163611,1175711,1177711,1178711,1180811,1183811,1186811,1190911,1193911,1196911,12 |