Skip to content

Instantly share code, notes, and snippets.

View JacobLinCool's full-sized avatar
👋
Hi

JacobLinCool JacobLinCool

👋
Hi
View GitHub Profile
@JacobLinCool
JacobLinCool / alternitive.md
Last active January 2, 2024 07:45
install script for macOS
  1. 安裝 pnpm: https://pnpm.io/installation
  2. 安裝 node 18: pnpm env use -g 18
  3. 安裝 ba: pnpm i -g bahamut-automation
  4. 安裝 firefox (optional): ba install firefox
  5. 產生 example config (optional): ba example
@JacobLinCool
JacobLinCool / Bahamut Automation Docker
Last active June 24, 2024 12:13
Bahamut Automation Docker (🐳)
如何使用?
1. 安裝 Docker Desktop: https://www.docker.com/products/docker-desktop/
2. 看 README.md
name: 自動化
on:
schedule:
- cron: "0 5,17 * * *"
workflow_dispatch:
jobs:
automation:
name: 自動化
@JacobLinCool
JacobLinCool / script.js
Last active July 24, 2021 19:22
Export & Import Champion Island Game Data
KEYS = [
"KITSUNE_climbingintro_VIDEO_SEEN",
"KITSUNE_marathonoutro_VIDEO_SEEN",
"KITSUNE_fsOneEighty_COMPLETE",
"KITSUNE_SLEEPING_CAT",
"KITSUNE_CONSTRUCTION",
"KITSUNE_HOT_SPRING",
"KITSUNE_rugby_rating",
"KITSUNE_pingpong:hard_rating",
"KITSUNE_TUT_MOVE",
@JacobLinCool
JacobLinCool / candidates.js
Created March 31, 2021 13:54
甄選會一階錄取爬蟲 JS
let result = {};
let root = `https://www.cac.edu.tw/CacLink/apply110/110apply_pgSieve_22sd8rga/html_sieve_110swk5m/ColPost/collegeList.htm`;
console.log(`Fetching College List...`);
let college_list_dom = await fetch(root)
.then((r) => r.text())
.then((text) => {
return new DOMParser().parseFromString(text, "text/html");
});
// Factorial
function F(n){
let sum = 1;
for(let i = 1; i <= n; i++) sum *= i;
return sum;
}
// Permutation
function P(a, b) {
return (F(a) / F(a-b));
}
function response() {
this.body = [
{
"id":10000000,
"accountId":"a1234567b",
"title":"Package",
"body":"Please collect your package.",
"clientVersion":50600,
"country":"tw",
"created":1582410142,
@JacobLinCool
JacobLinCool / nyt.js
Last active February 20, 2021 03:57
New York Times article download script
if(!location.href.includes("nytimes")) {
alert("Only New York Times");
}
else {
let win = window.open();
win.document.open();
// Get Title
try{
win.document.title = document.getElementsByClassName("e1h9rw200")[0].innerText;
win.document.write("<h2>"+document.getElementsByClassName("e1h9rw200")[0].innerText+"</h2>");
@JacobLinCool
JacobLinCool / autoCollector.js
Last active August 29, 2020 04:49
FB In-Stream Rewards Auto Collector
function autoCollector() {
var self = this;
self.start = () => {
self.total = "已經獲得:\n\n";
self.log += "\n-- 日誌紀錄開始 --\n";
self.interval = setInterval(
function() {
try {
document.querySelector(self.settings.target).click();
console.log("成功!");