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
REG ADD "HKLM\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps" /f | |
REG ADD "HKLM\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps" /v DumpFolder /t REG_EXPAND_SZ /d "%%LOCALAPPDATA%%\CrashDumps" /f | |
REG ADD "HKLM\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps" /v DumpCount /t REG_DWORD /d 10 /f | |
REG ADD "HKLM\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps" /v DumpType /t REG_DWORD /d 2 /f |
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
// https://gist.github.com/mkckr0/97ec5b0d99feede4c19ee6f905d5e722 | |
val repoMirrorMap = mapOf( | |
"https://repo.maven.apache.org/maven2" to "https://maven.aliyun.com/repository/central", | |
"https://dl.google.com/dl/android/maven2" to "https://maven.aliyun.com/repository/google", | |
"https://plugins.gradle.org/m2" to "https://maven.aliyun.com/repository/gradle-plugin", | |
"https://jcenter.bintray.com" to "https://maven.aliyun.com/repository/jcenter", | |
) | |
val repoReplaceMap = mapOf( | |
"https://maven.google.com" to "https://dl.google.com/dl/android/maven2" |
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 json | |
import os | |
import sys | |
from xmlrpc.client import Binary, ServerProxy | |
cwd = os.path.dirname(__file__) | |
img_list = sys.argv[1:] | |
with open(f"{cwd}/config.json", 'r', encoding='utf8') as ifile: | |
config = json.load(ifile) |
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
(() => { | |
let iframe = document.createElement('iframe') | |
iframe.style.display = 'none' | |
document.body.appendChild(iframe) | |
let results = {} | |
for (k of Object.getOwnPropertyNames(window)) { | |
if (iframe.contentWindow.hasOwnProperty(k)) { | |
continue | |
} |
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
<link rel="preload" href="https://some.ttf" as="font" type="font/ttf" crossorigin="anonymous" /> |
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
class int_fmt: | |
digit_count: int | |
def __init__(self, max_n: int) -> None: | |
self.digit_count = len(str(max_n)) | |
def __call__(self, n: int) -> str: | |
return '{n:0{w}d}'.format(n=n, w=self.digit_count) | |
fmt = int_fmt(100) | |
fmt(3) |
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
json.dumps = functools.partial(json.dumps, default=vars, ensure_ascii=False, indent=2) | |
json.dumps(o) |
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
cookies = SimpleCookie() | |
cookies.load(open('cookie.txt', 'r', encoding='utf8').read()) | |
cookies = {k: v.value for k, v in cookies.items()} | |
json.dump(dict(session.cookies.items()), open('cookie.json', 'w', encoding='utf8'), indent=2) |
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
HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Run | |
HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run | |
HKLM\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Run | |
HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\StartupApproved\Run | |
HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\StartupApproved\Run32 |
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
ffmpeg -hide_banner -y -user_agent "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36 Edg/109.0.1518.52" -referer "" -i "http://.m3u8" -c copy out.mp4 |
NewerOlder