Skip to content

Instantly share code, notes, and snippets.

@stu43005
stu43005 / windows-explorer-fix-ts-files.reg
Created June 16, 2021 14:13
fxxk windows explorer fix ts files
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\.ts]
@="VSCode.ts"
"Content Type"="text/plain"
"PerceivedType"="text"
[-HKEY_CLASSES_ROOT\.ts\ShellEx\{BB2E617C-0920-11D1-9A0B-00C04FC2D6C1}]
[-HKEY_CLASSES_ROOT\.ts\ShellEx\{e357fccd-a995-4576-b01f-234630154e96}]
const crypto = require('crypto');
class PasswordHash {
static saltByteSize = 16;
static hashByteSize = 64;
static iterations = 100000;
static getSalt(size = this.saltByteSize) {
const saltBuf = crypto.randomBytes(size);
return saltBuf.toString('base64');
}
@stu43005
stu43005 / install_AdGuardHome.sh
Created December 4, 2020 16:30
install AdGuard Home in Synology RT1900ac
mkdir /opt
cd /opt
wget https://github.com/AdguardTeam/AdGuardHome/releases/download/latest/AdGuardHome_linux_armv7.tar.gz
tar -xzvf AdGuardHome_linux_armv7.tar.gz
# grep -rn '/etc/' -e 'dnsmasq'
# netstat -lnp | grep 'dnsmasq'
echo "port=0" >> /etc/dhcpd/dhcpd-port-port.conf
echo 'enable="yes"' > /etc/dhcpd/dhcpd-port-port.info
echo "port=0" >> /etc/dhcpd/dhcpd.conf
@stu43005
stu43005 / moneypro_import.csv
Created November 23, 2020 16:07
Money Pro import csv example
Category Amount Amount received Date Account Account (to) Description Agent Currency Check # Class Time
飲食 -25 2020/10/20 玉山Pi錢包卡 Pi-全家便利商店
@stu43005
stu43005 / eh-mytags-day.js
Created September 21, 2020 12:50
查E-H MyTags各tag最後發表日期距今幾天
(async () => {
const gts = Array.from(document.querySelectorAll('.gt').values());
const tags = gts.map(el => el.title).filter(tag => tag.startsWith('artist:') || tag.startsWith('group:'));
for (const tag of tags) {
const res = await fetch(`/tag/${tag}`);
const text = await res.text();
const parser = new DOMParser();
const doc = parser.parseFromString(text, "text/html");
const div = doc.querySelector('.gl1t:nth-child(1) .gl5t div:nth-child(1) div:nth-child(2)');
@stu43005
stu43005 / convert to mp3.bat
Created October 25, 2019 10:37
convert .wav to .mp3 using ffmpeg
@echo off
for /f "tokens=*" %%G in ('dir /b /s *.wav') do (
echo `%%~nxG` convert to `%%~nG.mp3`
ffmpeg -hide_banner -i "%%~nxG" -vn -ar 48000 -ac 2 -b:a 320k "%%~nG.mp3"
)
@stu43005
stu43005 / Readme.md
Created July 25, 2019 06:34
LINE 貼圖轉換圖片大小為512,適用於Telegram

用法

npm i sharp
  • 下載 LINE 貼圖包 ({id}替代為貼圖ID)
http://dl.stickershop.line.naver.jp/products/0/0/1/{id}/iphone/[email protected]
  • 執行 resize.js
@stu43005
stu43005 / capture.js
Created January 25, 2019 12:49
Youtube capture to image
(function () {
"use strict";
const scale = 1;
function captureImage() {
const video = document.querySelector("#ytd-player video");
const canvas = document.createElement("canvas");
canvas.width = video.videoWidth * scale;
canvas.height = video.videoHeight * scale;
@stu43005
stu43005 / Sdorica X DEEMO.html
Created October 26, 2018 13:01
https://www.sdoricaxdeemo.rayark.games/ Sdorica X DEEMO 特設網頁,查看進度%數及更新時間
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Sdorica X DEEMO</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
<iframe src="https://www.sdoricaxdeemo.rayark.games/" frameborder="0" width="100%" height="800px"></iframe>

前言

起因是在Discord群組內有一個大課長,聽說課了8萬,並且從5/23就說要賣帳號,到現在都還沒賣掉,這不是本文討論的重點。 以下就以大課長的發言為主題下去做深入討論。

幻境以現在的模式會逼走課長

目前Sdorica確實是對肯拼排名的很不友善,畢竟目前最高傷害還是娜雅這種高隨機性的角色,主要的排名分數還是在拼回合。

在隨機盤面的情況,同樣隊伍下容易浪費時間,愛打幻境的太拼運氣、浪費時間;不打幻境的無事可做

以課長的角度想