Skip to content

Instantly share code, notes, and snippets.

View book000's full-sized avatar
👀
record User(String nickName, String screenName, Location country){}

Tomachi book000

👀
record User(String nickName, String screenName, Location country){}
View GitHub Profile
@book000
book000 / frps-installer.sh
Last active December 21, 2024 07:16
frps install & upgrader
#!/bin/bash
set -eu
# jq がインストールされていない場合はインストールする
if ! type jq > /dev/null 2>&1; then
sudo apt-get install -y jq
fi
# frp の最新バージョンを取得する
latest_tag=$(curl -s https://api.github.com/repos/fatedier/frp/releases/latest | jq -r '.tag_name')
@book000
book000 / download_jobcan_bonus.js
Last active December 25, 2024 01:05
ジョブカン 給与明細・賞与明細ダウンロードスクリプト。https://payroll.jobcan.jp/employees/my_data/payslips で実行
/**
* Get all bonus data from the page
*
* @returns {Array} - Array of all bonus data
*/
function get_all_bonus() {
const all_bonus = JSON.parse(document.querySelector('div[data-react-class="App"]').getAttribute("data-react-props")).values.all_bonus
const results = []
for (const bonus of all_bonus) {
const pay_on = bonus.pay_on
import datetime
import json
import os
import time
import zipfile
from tqdm import tqdm
from concurrent.futures import ProcessPoolExecutor, as_completed
class FileSystemTree:
def __init__(self, relative_path, absolute_path, children=None, timestamp=None):
param(
[string]$Year, # yyyy部分を引数として指定
[int]$MaxParallel = 10 # 並列実行の最大数を指定(デフォルト10)
)
$sourceFolder = "N:\Users\tomachi\Pictures\VRChat"
$destinationFolder = "N:\Users\tomachi\Pictures\VRChat\webp"
$ffmpegPath = "ffmpeg"
import struct
def float_to_hex(f):
"""Convert a float to hex representation in little endian format."""
return struct.pack('<d', f).hex()
def convert_to_hex(meters):
"""Convert meter value to IEEE 754 hex representation."""
float_hex = float_to_hex(meters)
# Extract the last 8 bytes (16 hex characters) and format the hex string to match the given output format
git fetch --all
$remoteBranches = git branch -r --format='%(refname:short)'
$branches = git branch --format='%(refname:short)' | Where-Object { $_ -ne "" }
$branchTable = @()
foreach ($branch in $branches) {
$linkedRemote = git config --get branch.$branch.remote
if ($? -eq $false) {
$linkedRemote = $null
/**
* DLsite の購入履歴ページ HTML をパースし、購入履歴情報をリストとして返す
*
* @param doc DLsite の購入履歴ページの HTML ドキュメント
* @returns 購入履歴情報のリストと、次のページがあるかどうかの真偽値
*/
function parseUserBuyPage(doc) {
const elements = Array.from(
doc.querySelectorAll("div#buy_history_this > table.work_list_main tr:not(:first-child)")
);
@book000
book000 / get-optout-mutual-friends-users.sql
Created December 20, 2025 20:11
共通の友人を非表示にしているユーザーを抽出するVRCX.sqlite3へのSQL
WITH mutual_friend_ids AS (
SELECT uid, COUNT(*)
FROM (
SELECT friend_id AS uid
FROM usr0b83d9be985242dd98e2625062400acc_mutual_graph_links
UNION ALL
SELECT mutual_id AS uid
FROM usr0b83d9be985242dd98e2625062400acc_mutual_graph_links
)
WHERE uid <> 'usr_00000000-0000-0000-0000-000000000000'