This file contains hidden or 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 qualified Data.Set as S | |
nub = go S.empty | |
where go _ [] = [] | |
go s (x:xs) | S.member x s = go s xs | |
| otherwise = x : go (S.insert x s) xs |
This file contains hidden or 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
/* 整體控制 */ | |
body { | |
font-family: "M 翔鶴黑體 TC", "PingFang TC", "LiHei Pro", "Heiti TC", | |
"Source Han Sans TC", "Hiragino Sans", "Meiryo", "Century Gothic", | |
"Microsoft Jhenghei", "微軟正黑體", sans-serif !important; | |
text-rendering: optimizeLegibility; | |
height: 100vh; | |
-webkit-font-smoothing: antialiased; | |
-moz-osx-font-smoothing: grayscale; | |
-moz-font-feature-settings: "liga" on; |
This file contains hidden or 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 lang="zh-TW"> | |
<form name="form" id="form"> | |
<label for="test1">test1</label> | |
<select name="test1"> | |
<option>Dog</option> | |
<option>Cat</option> | |
<option>Hamster</option> | |
<option>Parrot</option> | |
<option>Spider</option> |
- Install ffmpeg
- Go to your sticker folder then run
$ cd /[YOUR_STICKER_PACK]/animation@2x
$ for i in *.png; do ffmpeg -i "$i" -vf scale=w=512:h=512:force_original_aspect_ratio=decrease -vcodec libvpx-vp9 "${i%.*}.webm" -y; done
This file contains hidden or 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
async function addMelonCart() { | |
let list_text = prompt("Enter melonbooks url list (separated by newline)"); | |
if (!list_text) return; | |
urlList = list_text.split("\n"); | |
// filter empty url | |
urlList = urlList.filter((url) => url); | |
for (let i = 0; i < urlList.length; i++) { | |
const url = urlList[i]; | |
// check if url is melonbooks | |
if (!url.includes("melonbooks.co.jp" && "product_id=")) { |
This file contains hidden or 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
// 上傳自訂禮物 | |
// 推薦尺寸32x32 | |
let inputElement = document.createElement("input"); | |
inputElement.type = "file"; | |
inputElement.id = "imageInput"; | |
inputElement.accept = "image/*"; | |
let uploadButton = document.createElement("button"); | |
uploadButton.textContent = "上傳自訂禮物"; | |
uploadButton.style = "color: white;" | |
uploadButton.onclick = uploadImage; |