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
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 zipfile
from tqdm import tqdm
class FileSystemTree:
def __init__(self, relative_path, absolute_path, children=None, timestamp=None):
self.relative_path = relative_path
self.absolute_path = absolute_path
@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
@book000
book000 / no_concurrent_exec.sh
Last active November 10, 2024 22:59
Bashにおけるロック管理による同時実行の禁止制御
#!/bin/bash
cd "$(dirname "$0")" || exit 1
# ロックファイルのパス
LOCKFILE="$(realpath "$0").lock"
# ファイルディスクリプタ9でロックを取得 (エラーメッセージを無視)
exec 9>"$LOCKFILE" 2>/dev/null
if [ $? -ne 0 ]; then
echo "Failed to open lockfile $LOCKFILE. It seems to be already running."
@book000
book000 / toggleAllRestrict.js
Created August 11, 2024 14:08
toggling all bookmarks to public or private
/*
This script is for toggling all bookmarks on pixiv to public or private.
Open your own pixiv user page, switch to the bookmarks tab, and then run this script in the browser console.
(e.g., https://www.pixiv.net/users/{userId}/bookmarks/artworks)
*/
/**
* Wait for an element to appear in the DOM and resolve with it.
*
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy