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 sys | |
import os | |
import json | |
import ctypes | |
import pywintypes | |
import win32api | |
import win32gui |
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
(() => { | |
var textarea = document.createElement("textarea"); | |
textarea.textContent = "["+document.title+"]("+location.href+")"; | |
document.body.appendChild(textarea); | |
textarea.select(); | |
document.execCommand("copy"); | |
document.body.removeChild(textarea); | |
})(); |
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 boto3 | |
import os | |
import sys | |
# import subprocess | |
# import botocore | |
# import botocore.errorfactory | |
import asyncio |
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
import sys | |
import slack_sdk | |
try: | |
import toml | |
except ModuleNotFoundError: | |
import tomli as toml | |
def notify_slack(config: dict, message: str): | |
slack_client = slack_sdk.WebClient(config["slack"]["token"]) |
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 sys | |
import asyncio | |
import json | |
import aiohttp | |
cdp_port = 9223 | |
class MyCdpClient: |
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
from ast import literal_eval as unquote | |
from json.encoder import encode_basestring as quote | |
from subprocess import list2cmdline # for windows cmdline way quote |
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
import sys | |
import msvcrt | |
linedata = '' | |
cur = 0 | |
while True: | |
getch_result_1 = msvcrt.getwch().encode() | |
# "UP": b'\xe0', "H" | |
# "DOWN": b'\xe0', "P" |
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
#!./Scripts/python.exe | |
import pyte.screens | |
import pyte.streams | |
import pyte | |
import random, string | |
import sys | |
import shutil | |
import win32console | |
import win32con |
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
import prompt_toolkit | |
import prompt_toolkit.patch_stdout | |
import asyncio | |
async def write_something(stdout_proxy: prompt_toolkit.patch_stdout.StdoutProxy): | |
i = 0 | |
while True: | |
stdout_proxy.write(f"info: hello {i}\n") | |
await asyncio.sleep(0.2) | |
i += 1 |
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 sys | |
import socket | |
import ctypes | |
import ctypes.wintypes | |
import os | |
import asyncio | |
socket.AF_UNIX = 1 | |
UNIX_PATH_MAX = 108 |