Skip to content

Instantly share code, notes, and snippets.

View mottcha's full-sized avatar

mottcha mottcha

View GitHub Profile
# --- Layer 1: Toxic TLDs (High Abuse Rate) ---
||zip^
||mov^
||kim^
||party^
||cricket^
||science^
||gdn^
||racing^
||faith^
@mottcha
mottcha / private_dns.txt
Last active December 13, 2025 02:57
Block unnecessary/private DNS queries to upstream servers.
# ===================================================================
# AdGuard Home: DNS Infrastructure & Privacy Hardening Rules
# Version: 2025-07-19
# Purpose: Block unnecessary/private DNS queries to upstream servers.
# ===================================================================
# === Section 1: Special-Use & Reserved Top-Level Domains (TLDs) ===
# RFC 6761 & 6762. These should not be resolved by public DNS.
||local^$dnsrewrite=NXDOMAIN
||localhost^$dnsrewrite=NXDOMAIN
||test^$dnsrewrite=NXDOMAIN
@mottcha
mottcha / CaddyFile
Created February 17, 2025 07:37
Building LibreChat with docker compose & tailscale & caddy
{$DOMAIN}:1234 { # external port
log {
level INFO
output file {$LOG_FILE} {
roll_size 10MB
roll_keep 10
}
}
tls {
@mottcha
mottcha / .md
Last active December 5, 2024 11:56
enable smart connect on moto g64y 5g
# Lenovo remove SmartConnect features (former Ready For) on some devices by disabling the related apps.
# Worked on moto g64y 5g

# Install SmartConnect apk downloaded from on the Internet
adb install ./SmartConnect.apk

# Find apk paths to "Ready For Engine" & "Ready For Video"
adb shell pm list packages -f | findstr "com.motorola.mobiledesktop"
adb shell pm list packages -f | findstr "com.motorola.motcameradesktop"
@mottcha
mottcha / browser.md
Last active May 31, 2024 21:34
A personal adblocker configuration (for Japanese user)

For Browser

これはDNSブロックを前提とした構成です。主にDNSではブロックできないものをブロックするようにしています。

DNSブロックを使用しない場合、 必要に応じてマルウェア系フィルターの追加やブラウザー搭載のセキュリティ機能を兼用するとよいと考えられます。

uBlock Origin on PC

デフォルト購読リストあるものは省略しています。

@mottcha
mottcha / log.gs
Last active June 16, 2023 17:15
Move root files to the archive folder on Google Drive.
var _log = "";
function log(out) {
console.log(out);
_log += out + "\n";
}
function getLog() {
return _log;
}
@mottcha
mottcha / export.json
Last active June 2, 2023 10:58
This script enables YouTube Music to use the arrow keys to go back a few seconds.
[
{
"key": "Left",
"label": "GoBack",
"action": "javascript",
"activeInInputs": true,
"blacklist": "whitelist",
"sites": "https://music.youtube.com/*",
"code": "// Duration you want (seconds)\nvar duration= 3;\nvar v = document.getElementsByClassName('video-stream')[0];\nv.currentTime = v.currentTime - duration;",
"sitesArray": [