Skip to content

Instantly share code, notes, and snippets.

View akira02's full-sized avatar

Chiaki.C akira02

View GitHub Profile
@akira02
akira02 / upload_custom_gift.js
Last active December 7, 2023 10:57
Grow up MERRY TREE image uploader
// 上傳自訂禮物
// 推薦尺寸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;
@akira02
akira02 / addMelonCart.js
Last active December 28, 2023 08:40
Batch add Melonbooks URLs to cart
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=")) {
@akira02
akira02 / MELONBOOKS_FORMULA.md
Last active August 1, 2023 14:56
Get Melonbooks page infos with Google Sheets Named function

Get Melonbooks page infos with Google Sheets Named function

These Google Sheets functions can help you get infos from Melonbooks website. image

Get cover image of melonbooks:

Argument placeholders: url

@akira02
akira02 / LineToTelegramWebM.md
Created April 7, 2022 06:23
Line Animated png to telegram webm
  1. Install ffmpeg
  2. 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
<!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>
@akira02
akira02 / ChiakiPlurk.css
Last active October 27, 2020 16:26
Chiaki Plurk CSS rework (Beta)
/* 整體控制 */
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;
@akira02
akira02 / fb-messenger-like-css.markdown
Created July 31, 2020 04:44
FB messenger-like CSS
@akira02
akira02 / nub.hs
Created April 26, 2018 16:52
Implement nub function in Haskell
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