Skip to content

Instantly share code, notes, and snippets.

View u1-liquid's full-sized avatar
👋
手を振る

あわわわとーにゅ u1-liquid

👋
手を振る
View GitHub Profile
// ==UserScript==
// @name YouTube Live Chat Show Only Specific Author
// @namespace https://github.com/u1-liquid
// @version 1.0.0
// @description YouTubeのライブチャット上で特定ユーザー以外のメッセージを非表示
// @grant none
// @author u1-liquid
// @source https://gist.github.com/u1-liquid/97c9a7c97d1712c3f9d7e5118a6254a9
// @include https://www.youtube.com/live_chat?*
// @run-at document-idle
// ==UserScript==
// @name YouTube Custom CSS
// @namespace https://github.com/u1-liquid
// @version 1.0.0
// @description YouTube上で特定要素を非表示/スタイルを調整
// @grant GM_addStyle
// @author u1-liquid
// @source https://gist.github.com/u1-liquid/6e768d1761ec4abed9815268fabcae43
// @match https://www.youtube.com/*
// @run-at document-idle
@u1-liquid
u1-liquid / meet-voicevox-tts.user.js
Last active May 11, 2025 19:39
VOICEVOX TTS for Google Meet
// ==UserScript==
// @name VOICEVOX TTS for Google Meet
// @namespace https://github.com/u1-liquid
// @version 1.0.3
// @description Google Meetのチャット送信メッセージをローカルのVOICEVOXで読み上げる
// @grant GM_xmlhttpRequest
// @author u1-liquid
// @source https://gist.github.com/u1-liquid/da1a04abf7a69f7229d107b03655b751
// @match https://meet.google.com/*
// @run-at document-body
@u1-liquid
u1-liquid / gather-voicevox-tts.user.js
Last active May 12, 2025 02:52
VOICEVOX TTS for Gather.Town
// ==UserScript==
// @name VOICEVOX TTS for Gather.Town
// @namespace https://github.com/u1-liquid
// @version 1.0.5
// @description Gather.Townのチャット送信メッセージをローカルのVOICEVOXで読み上げる
// @grant GM_xmlhttpRequest
// @author u1-liquid
// @source https://gist.github.com/u1-liquid/088e54bdc31a1b5845e5dd3b8961fac6
// @match https://app.gather.town/*
// @run-at document-body
CREATE OR REPLACE FUNCTION base36_decode(IN base36 varchar)
RETURNS bigint AS $$
DECLARE
a char[];
ret bigint;
i int;
val int;
chars varchar;
BEGIN
chars := '0123456789abcdefghijklmnopqrstuvwxyz';
@u1-liquid
u1-liquid / gist:d0e420cf8c8684ed95f6406d4683172f
Created December 25, 2023 21:06
Find IPv4 from Filesystem
#!/bin/sh
# https://unix.stackexchange.com/a/522127
cat /proc/net/fib_trie | awk '/32 host/ { print f } {f=$2}' | sort | uniq | grep -v 127.0.0.1
@u1-liquid
u1-liquid / Set-DNS-DoH.ps1
Last active December 22, 2023 01:16
Set DNS servers
#Requires -RunAsAdministrator
Write-Output "Update DoH settings ..."
$baseRegistryPath = "HKLM:\SYSTEM\CurrentControlSet\Services\Dnscache\InterfaceSpecificParameters"
if (Test-Path $baseRegistryPath) {
Remove-Item -Path $baseRegistryPath -Recurse -Force 2>&1 | Out-Null
}
$adapters = Get-NetAdapter -IncludeHidden | Where-Object {$_.Status -ne 'Not Present'}
#!/bin/bash
apt-get update
dpkg --get-selections | grep deinstall | awk '{print $1}' | xargs apt-get --yes purge
apt-get --yes --ignore-hold --with-new-pkgs --allow-change-held-packages upgrade
apt-get --yes --ignore-hold --allow-change-held-packages dist-upgrade
apt-get --yes --purge autoremove
dpkg --get-selections | grep deinstall | awk '{print $1}' | xargs apt-get --yes purge
# vmware-modconfig --console --install-all
@u1-liquid
u1-liquid / parseDateTime.java
Created August 8, 2023 10:46
Universal DateTime Pattern
private static final DateTimeFormatter universalDateTimePattern = DateTimeFormatter.ofPattern("[y-M-d[[' ']['T'][H[:m[:s[.SSSSSS][.SSS][.S]]]][' '][VV][zzz][OOOO][XXXXX]]][H[:m[:s[.SSSSSS][.SSS][.S]]]]");
public static ZonedDateTime parseDateTime(String dateTime) {
try {
TemporalAccessor temporal = universalDateTimePattern.parseBest(dateTime, ZonedDateTime::from, OffsetDateTime::from, LocalDateTime::from, LocalDate::from, LocalTime::from);
if (temporal instanceof ZonedDateTime) return (ZonedDateTime) temporal;
else if (temporal instanceof OffsetDateTime) return ((OffsetDateTime) temporal).atZoneSameInstant(ZoneId.systemDefault());
else if (temporal instanceof LocalDateTime) return ((LocalDateTime) temporal).atZone(ZoneId.systemDefault());
else if (temporal instanceof LocalDate) return ((LocalDate) temporal).atStartOfDay(ZoneId.systemDefault());
else if (temporal instanceof LocalTime) return ((LocalTime) temporal).atDate(LocalDate.now()).atZone(ZoneId.systemDefault());
@u1-liquid
u1-liquid / meilisearch-cleanup-tasks.service
Created June 28, 2023 07:19
Cleanup Meilisearch Tasks Database Weekly with Systemd-Timer
[Unit]
Description=Cleanup Meilisearch Tasks Database
After=meilisearch.service
[Service]
Type=oneshot
ExecStart=curl -v -H 'Authorization: Bearer MASTER_KEY' -X DELETE 'http://127.0.0.1:7700/tasks?statuses=failed,canceled,succeeded'
User=meilisearch
Group=meilisearch