Skip to content

Instantly share code, notes, and snippets.

View tushortz's full-sized avatar
❤️
One Love

Taiwo Kareem tushortz

❤️
One Love
View GitHub Profile
from selenium import webdriver
from selenium.webdriver.chrome.options import DesiredCapabilities
from selenium.webdriver.common.proxy import Proxy, ProxyType
import time
co = webdriver.ChromeOptions()
co.add_argument("log-level=3")
co.add_argument("--headless")
@tushortz
tushortz / Port service
Last active March 4, 2024 09:09
A list of python port services and their service numbers
1: tcpmux
7: echo
9: discard
11: systat
13: daytime
15: netstat
17: qotd
18: msp
19: chargen
20: ftp-data
@tushortz
tushortz / font_installer.py
Created December 25, 2018 21:55
Python script to install multiple fonts at once on the Windows OS.
import os
import shutil
import ctypes
from ctypes import wintypes
import sys
import ntpath
try:
import winreg
except ImportError:
import _winreg as winreg
{
".3g2": "video/3gpp2",
".3gp": "video/3gpp",
".7z": "application/x-7z-compressed",
".aac": "audio/aac",
".abw": "application/x-abiword",
".afm": "application/x-font-type1",
".ai": "application/postscript",
".aiff": "audio/x-aiff",
".arc": "application/x-freearc",
@tushortz
tushortz / UNICODE to ASCII python replace
Created April 6, 2016 22:14
Function to replace some annoying characters
def unicodetoascii(text):
TEXT = (text.
replace('\\xe2\\x80\\x99', "'").
replace('\\xc3\\xa9', 'e').
replace('\\xe2\\x80\\x90', '-').
replace('\\xe2\\x80\\x91', '-').
replace('\\xe2\\x80\\x92', '-').
replace('\\xe2\\x80\\x93', '-').
replace('\\xe2\\x80\\x94', '-').
@tushortz
tushortz / Java.sublime-build
Last active February 14, 2023 05:11
Java, JavaDoc, JAR build System for Sublime text (Linux) including Wordcount and File list support.
{
"cmd": ["javac '$realpath$file' && java $file_base_name && rm *.class"],
"selector": "source.java",
"shell": true,
"variants": [
{
"name": "JavaDoc",
"cmd": ["mkdir documentation && javadoc -d documentation *.java"]
},
@tushortz
tushortz / uk-text-scam-phone-numbers.txt
Last active November 1, 2022 01:05
A list of several UK phone numbers text scammers use to lure people
+44 7394 154795
+44 7521 216234
+44 7521 234316
+44 7521 243292
+44 7542 340061
+44 7542 344849
+44 7543 537016
+44 7568 457865
+44 7593 263277
+44 7725 416161
@tushortz
tushortz / countries_codes_and_coordinates.csv
Created April 21, 2021 06:32 — forked from tadast/countries_codes_and_coordinates.csv
Countries with their (ISO 3166-1) Alpha-2 code, Alpha-3 code, UN M49, average latitude and longitude coordinates
Country Alpha-2 code Alpha-3 code Numeric code Latitude (average) Longitude (average)
Afghanistan AF AFG 4 33 65
Albania AL ALB 8 41 20
Algeria DZ DZA 12 28 3
American Samoa AS ASM 16 -14.3333 -170
Andorra AD AND 20 42.5 1.6
Angola AO AGO 24 -12.5 18.5
Anguilla AI AIA 660 18.25 -63.1667
Antarctica AQ ATA 10 -90 0
Antigua and Barbuda AG ATG 28 17.05 -61.8
@tushortz
tushortz / Qt.sublime-build
Last active March 23, 2021 23:13
Qt Build System for Sublime text on Linux
{
"cmd": ["qmake -project && subl *.pro"],
"file_regex": "^(...*?):([0-9]*):?([0-9]*)",
"selector": "source.cpp",
"shell": true,
"variants": [
{
@tushortz
tushortz / parse_json_data_by_string.py
Created September 14, 2020 16:54
An attempt to parse json or python dict using just normal strings
# Author: Taiwo Kareem
# Attempt to parse dict by using string path
def str_data(paths, obj):
paths = paths.split(".")
for path in paths:
if path.isnumeric():
path = int(path)
obj = obj[path]