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 python3 | |
from PIL import Image | |
import csv | |
def convert_image_to_csv(image_path, csv_path): | |
# Open the image | |
with Image.open(image_path) as img: | |
# Convert image to grayscale (if it's not already) | |
img = img.convert('L') |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"> | |
<title>My FullScreen App</title> | |
</head> | |
<body> | |
<div id="app"> | |
<h1>My FullScreen App</h1> |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"> | |
<title>My FullScreen App</title> | |
</head> | |
<body> | |
<div id="app"> | |
<h1>My FullScreen App</h1> |
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
// ==UserScript== | |
// @name PWA Everything | |
// @author Evan Reichard | |
// @version 0.0.1 | |
// @match *://*/* | |
// @grant none | |
// @run-at document-idle | |
// @noframes | |
// ==/UserScript== |
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
# The following command starts a wireguard-go container using wg0.conf | |
# I still can't find a boringtun container that works for Synology DSM 7.1 | |
sudo docker run -d \ | |
--cap-add NET_ADMIN \ | |
--device=/dev/net/tun \ | |
-v ❗/volume1/docker/wireguard/wg0.conf❗:/etc/wireguard/wg0.conf \ | |
--sysctl net.ipv4.ip_forward=1 \ | |
--name wireguard-go \ | |
masipcat/wireguard-go |
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
Windows Registry Editor Version 5.00 | |
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\RasMan\Parameters] | |
"NegotiateDH2048_AES256"=dword:00000002 |
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
# load nvm && go to working dir && use .nvmrc && execute script | |
* * * * * . ~/.nvm/nvm.sh && cd /tmp/ && nvm use && /tmp/test.js >> /tmp/test.js.log 2>&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
<html> | |
<body> | |
<section> | |
<svg class="logo" viewBox="0 0 16 8" fill="none" xmlns="http://www.w3.org/2000/svg"> | |
<path d="M7.4 4.959C3.268 4.959 0 5.509 0 6.186C0 6.864 3.268 7.413 7.4 7.413C11.532 7.413 14.943 6.864 14.943 6.186C14.944 5.508 11.533 4.959 7.4 4.959ZM7.263 6.51C6.306 6.51 5.53 6.273 5.53 5.98C5.53 5.687 6.306 5.45 7.263 5.45C8.22 5.45 8.995 5.687 8.995 5.98C8.995 6.273 8.219 6.51 7.263 6.51ZM13.319 0.052002H9.701L7.769 2.291L6.849 0.0830021H1.145L0.933 1.045H3.202C3.202 1.045 4.239 0.909002 4.273 1.739C4.273 3.177 1.897 3.055 1.897 3.055L2.341 1.555H0.869L0.194 3.988H2.862C2.862 3.988 5.683 3.738 5.683 1.77C5.683 1.77 5.797 1.196 5.749 0.943002L7.124 4.62L10.559 1.055H13.165C13.165 1.055 13.963 1.123 13.963 1.74C13.963 3.178 11.604 3.028 11.604 3.028L11.969 1.556H10.682L9.946 3.989H12.399C12.399 3.989 15.465 3.799 15.465 1.71C15.465 1.709 15.404 0.052002 13.319 0.052002Z" /> | |
</svg> | |
</section> | |
<style type="text/css"> | |
* { | |
padding: 0; |
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
# remote url | |
$GEOIP_URL="https://github.com/Loyalsoldier/v2ray-rules-dat/raw/release/geoip.dat" | |
$GEOSITE_URL="https://github.com/Loyalsoldier/v2ray-rules-dat/raw/release/geosite.dat" | |
# resource path | |
$GEOIP_PATH="C:\Users\WD-40\AppData\Local\qv2ray\vcore\geoip.dat" | |
$GEOSITE_PATH="C:\Users\WD-40\AppData\Local\qv2ray\vcore\geosite.dat" | |
# backup path | |
$GEOIP_BACKUP=$GEOIP_PATH+".bak" | |
$GEOSITE_BACKUP=$GEOSITE_PATH+".bak" |
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 bash | |
# https://stackoverflow.com/questions/13713101/rsync-exclude-according-to-gitignore-hgignore-svnignore-like-filter-c | |
SOURCE="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" | |
TARGET=user@remote:/path/to/my/blog | |
rsync --delete-after --filter=":e- .gitignore" --filter "- .git/" -a --progress $SOURCE/ $TARGET |
NewerOlder