pip install -U pip
pip install -U setuptools
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 time | |
from http import HTTPStatus | |
from http.server import HTTPServer, BaseHTTPRequestHandler | |
from urllib.parse import urlparse, parse_qs | |
from functools import cached_property, partial | |
IP = "127.0.0.1" | |
PORT = 18018 |
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 secrets | |
import hashlib | |
from enum import Enum | |
import ecdsa | |
import base58 | |
class Key: | |
class Prefix(Enum): |
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
@ECHO OFF | |
SETLOCAL EnableExtensions DisableDelayedExpansion | |
REM This script sets and toggles your system proxy. | |
REM (Internet Explorer LAN proxy server) | |
REM Call the script with enable/disable/custom as the first command-line argument: | |
REM proxy.bat enable (use a proxy server for your LAN) | |
REM proxy.bat disable (uncheck use a proxy server for you LAN) | |
REM proxy.bat custom (set proxy server to the 'proxy' variable below) | |
REM Or just run the script to get a choice. |
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
#ifndef ARRAY2D_HPP_INCLUDE | |
#define ARRAY2D_HPP_INCLUDE | |
#include <algorithm> | |
#include <cstddef> | |
template <class T> | |
class Array2D { | |
public: | |
// clang-format off |
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
@ECHO OFF | |
SETLOCAL EnableExtensions DisableDelayedExpansion | |
REM This script will (de)activate a statically configured DNS server for a network interface. | |
REM Call the script with enable/disable as the first command-line argument: | |
REM dns.bat enable (set static DNS server) | |
REM dns.bat disable (obtain DNS server automatically [DHCP]) | |
REM Or just run the script to get a choice. | |
REM Additionally, you can use the second argument to set which interface to change. | |
REM Use `netsh interface show interface` to check your interface names. |
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
""" | |
Reset USB tethering network number. | |
Removes the network profiles made by tethering each time. | |
Requires administrative privileges. | |
""" | |
import winreg | |
import re |
Add to global snippets. (command palette > configure user snippets)
Select the text you want, write QuoteSwap and enter/tab to apply.
"QuoteSwap": {
"prefix": "QuoteSwap",
"body": "${TM_SELECTED_TEXT/(')|(\")/${1:+\"}${2:+'}/g}",
"description": "Swap single and double quotes."
}