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 | |
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." |
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
/* | |
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. | |
* |
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
class DxdiagParser { | |
constructor(dxdiag) { | |
this.dxdiag = dxdiag; | |
this.isDebug = false; | |
this.parsableSections = [ | |
"System Information", | |
"DxDiag Notes", | |
"DirectX Debug Levels", | |
"Display Devices", |
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
# package.jsonが無ければエラーを表示して終了する | |
if (-not (Test-Path .\package.json)) { | |
Write-Host "Error: package.json not found." -ForegroundColor Red | |
exit 1 | |
} | |
# package.jsonのeslintがv9以上だったら、v9では動作しないことを表示して終了する | |
$package_json = Get-Content -Path package.json -Raw | ConvertFrom-Json -AsHashtable | |
$eslint_version = $package_json.devDependencies.eslint | |
if ($eslint_version -ge "9.0.0") { |
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
# GitHubリポジトリをクローンするPowerShellスクリプト | |
# 関数: GitHubリポジトリのURLが有効かどうかを確認する | |
function Test-GitHubRepositoryURL { | |
param ( | |
[string]$URL | |
) | |
if ($URL -notmatch '^https:\/\/github\.com\/.+\/.+') { | |
Write-Host "エラー: 正しいGitHubリポジトリのURLを入力してください。" -ForegroundColor Red |
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 | |
function devopen() { | |
local workspace_folder="$(readlink -f "$1")" | |
if [ -d "$workspace_folder" ]; then | |
local wsl_path="$(wslpath -w "$workspace_folder")" | |
local path_id=$(printf "%s" "$wsl_path" | xxd -ps -c 256) | |
code --folder-uri "vscode-remote://dev-container%2B${path_id}/workspaces/$(basename "$workspace_folder")" | |
else |
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 Zoom100CursorA1NormalView() | |
' ScreenUpdatingを切るとA1セルがアクティブにはなるが、表示範囲が変わらない | |
Dim sheet As Object | |
For Each sheet In ActiveWorkbook.Sheets | |
sheet.Activate | |
ActiveSheet.Range("A1").Select | |
ActiveWindow.Zoom = 100 | |
ActiveWindow.View = xlNormalView | |
Next sheet | |
Sheets(1).Select |
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 Zoom100CursorA1NormalView() | |
Dim sheet As Object | |
For Each sheet In ActiveWorkbook.Sheets | |
sheet.Activate | |
ActiveSheet.Range("A1").Select | |
ActiveWindow.Zoom = 100 | |
ActiveWindow.View = xlNormalView | |
Next sheet | |
Sheets(1).Select | |
End Sub |
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
services: | |
logspout: | |
image: gliderlabs/logspout:v3.2.14 | |
command: syslog://logstash:5000 | |
environment: | |
- RETRY_COUNT=100 | |
depends_on: | |
logstash: | |
condition: service_healthy | |
volumes: |
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
/* ==UserStyle== | |
@name Full size display on Bitwarden | |
@namespace tomacheese.com | |
@version 1.0.1 | |
@updateURL https://gist.github.com/book000/894207763314aefc0ac0e7f6ed3dc857/raw/bitwarden-full-width.user.css | |
@description Bitwardenでフルサイズ表示する(プレミアムへの広告も消す) | |
@author Tomachi (book000) | |
==/UserStyle== */ | |
@-moz-document domain("vault.bitwarden.com") { | |
.container { |