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
@rem https://superuser.com/questions/1547316/eject-connected-external-hard-drive-using-cmd | |
C:\Windows\System32\rundll32.exe shell32.dll,Control_RunDLL hotplug.dll |
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 os | |
import sys | |
input_fn = sys.argv[1] | |
with open(input_fn, "rt", encoding="UTF-8") as fp: | |
input_text = fp.read() |
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
// ref: https://users.wfu.edu/natalie/s14phy770/projects/ | |
#include <cstdio> | |
#include <cstdlib> | |
#include <cmath> | |
#include <ctime> | |
#include <vector> | |
#include <random> |
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 os | |
import glob | |
import sys | |
import json | |
import subprocess | |
import zipfile | |
import io | |
import shutil |
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
diff -u a/bash.bash_logout b/bash.bash_logout | |
--- a/bash.bash_logout 2024-01-06 23:09:23.578819100 +0900 | |
+++ b/bash.bash_logout 2024-01-06 23:06:58.672315000 +0900 | |
@@ -10,6 +10,6 @@ | |
# System-wide bashrc file | |
# when leaving the console clear the screen to increase privacy | |
-if [ "$SHLVL" = 1 ]; then | |
- [ -x /usr/bin/clear ] && /usr/bin/clear | |
-fi |
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 os | |
import sys | |
import ctypes | |
import ctypes.wintypes | |
import time | |
import ctypes |
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
Array.from(document.querySelectorAll("img[src^=\"https://private-user-images.githubusercontent.com/\"]")).forEach((img, index, array)=>{ | |
if(!img.complete) { | |
let imgSrc = img.src; | |
img.src = ""; | |
img.style.display = "none"; | |
// img.setAttribute("_src", imgSrc) | |
let anchor = img.parentElement; | |
// anchor.removeChild(img); | |
let textNode = document.createTextNode("click to view image"); | |
anchor.appendChild(textNode) |
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
Array.from(document.querySelectorAll("img[src^=\"https://private-user-images.githubusercontent.com/\"]")).forEach((img, index, array)=>{ | |
if(img.complete) { | |
var anchor = img.parentElement; | |
anchor.removeAttribute("href") | |
// console.log(img) | |
var canvas = document.createElement("canvas") | |
canvas.height = img.naturalHeight | |
canvas.width = img.naturalWidth | |
canvas.style.maxWidth = "100%" | |
var context = canvas.getContext("2d") |
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 os | |
import datetime | |
import argparse | |
import re | |
import asyncio | |
import ipaddress | |
import socket | |
try: import tomllib as toml |
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 |
NewerOlder