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
/**
* 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)")
);
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
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
param(
[string]$Year, # yyyy部分を引数として指定
[int]$MaxParallel = 10 # 並列実行の最大数を指定(デフォルト10)
)
$sourceFolder = "N:\Users\tomachi\Pictures\VRChat"
$destinationFolder = "N:\Users\tomachi\Pictures\VRChat\webp"
$ffmpegPath = "ffmpeg"
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):
@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
@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 / vrcx-instance-videos.sql
Last active November 28, 2024 16:07
VRCX.sqlite3 からインスタンスごとの再生動画情報を抽出する
SELECT
gl.rowid AS join_id,
gl.created_at AS world_created_at,
gl.location AS instance_id,
gl.world_id AS world_id,
gl.world_name AS world_name,
gl.time AS instance_elapsed_time,
gl.group_name AS instance_group_name,
gvp.created_at AS video_created_at,
gvp.video_url AS video_url,
@book000
book000 / get_instance_videos_from_vrcx.py
Last active November 18, 2024 20:27
VRCX のデータベースから、インスタンスごとの動画情報をまとめてJSONに書き出す
import json
import sqlite3
import pandas as pd
import os
appdata_path = os.getenv('APPDATA')
dbpath = os.path.join(appdata_path, 'VRCX', 'VRCX.sqlite3')
print("DB Path: " + dbpath)
conn = sqlite3.connect(dbpath)
@book000
book000 / ListSheetNames.vb
Last active October 28, 2024 06:42
シート「シート名一覧」にシート名一覧を記載する
Sub ListSheetNames()
Dim ws As Worksheet
Dim sheetNames() As String
Dim i As Integer
Dim listSheet As Worksheet
' 画面更新と自動計算を一時停止
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual