This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 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)") | |
); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
param( | |
[string]$Year, # yyyy部分を引数として指定 | |
[int]$MaxParallel = 10 # 並列実行の最大数を指定(デフォルト10) | |
) | |
$sourceFolder = "N:\Users\tomachi\Pictures\VRChat" | |
$destinationFolder = "N:\Users\tomachi\Pictures\VRChat\webp" | |
$ffmpegPath = "ffmpeg" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sub ListSheetNames() | |
Dim ws As Worksheet | |
Dim sheetNames() As String | |
Dim i As Integer | |
Dim listSheet As Worksheet | |
' 画面更新と自動計算を一時停止 | |
Application.ScreenUpdating = False | |
Application.Calculation = xlCalculationManual | |
NewerOlder