This file contains hidden or 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
{ | |
"array": [ | |
1, | |
2, | |
3 | |
], | |
"boolean": true, | |
"null": null, | |
"number": 123, | |
"object": { |
This file contains hidden or 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
from requests import Session | |
session = Session() | |
headers = { | |
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; rv:91.0) Gecko/20100101 Firefox/91.0", | |
"Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8", | |
"Accept-Language": "en-US,en;q=0.5", | |
"Connection": "keep-alive", | |
"Upgrade-Insecure-Requests": "1 ", | |
"Sec-Fetch-Dest": "document", |
This file contains hidden or 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
from selenium.webdriver.chrome.options import Options | |
from selenium.webdriver.common.by import By | |
from selenium import webdriver | |
from time import sleep | |
options = Options() | |
options.headless = True |
This file contains hidden or 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
from time import sleep | |
import webbrowser | |
import pyautogui | |
def open_new_browser_tab(url: str) -> None: | |
#chrome_path = r"C:\Program Files\Google\Chrome\Application\chrome.exe" | |
#webbrowser.register("chrome", None, webbrowser.BackgroundBrowser(chrome_path)) | |
#webbrowser.get(using="chrome").open_new_tab(url=url) |
This file contains hidden or 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
import requests | |
import re | |
# we obtain the necessary data to make the query | |
session = requests.session() | |
resp = session.get("https://login.live.com/login.srf") | |
url = re.findall(r"bh:.([a-z:/.A-Z?0-9=&-]*)", resp.text)[0] | |
token = re.findall('name="PPFT" id=".+?" value="(.+?)"', resp.text)[0] | |
cookies = resp.cookies |
This file contains hidden or 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 bash | |
# check args | |
if [[ $# -eq 0 ]]; then | |
echo -e "\033[33m[!] you need to specify an email\033[0m" | |
echo " example: bash ./github-shh.sh [email protected]" | |
exit | |
fi | |
echo -e "\033[32m[+] generate a new SSH key\033[0m" |
This file contains hidden or 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 abrr_number(number, decimals=2): | |
scales = { | |
pow(10, 24): "Y", | |
pow(10, 21): "Z", | |
pow(10, 18): "E", | |
pow(10, 15): "P", | |
pow(10, 12): "T", | |
pow(10, 9): "G", | |
pow(10, 6): "M", |