Skip to content

Instantly share code, notes, and snippets.

@danny8376
danny8376 / google-utm-14-for-ios-default-search.user.js
Last active July 3, 2025 17:46
Google utm 14 for iOS default search
// ==UserScript==
// @name Google utm 14 for iOS default search
// @namespace http://saru.moe/
// @version 2025-07-03
// @description Try to add utm 14 for google search only for iOS default search engine
// @author DannyAAM
// @license MIT
// @match https://www.google.com/search*
// @icon https://www.gstatic.com/images/branding/searchlogo/ico/favicon.ico
// @grant none
#!/bin/sh
# ================================================================================
# You're not supposed to open this link directly
# Please run the following command according to the app you use
# -------- iSH --------
# wget -O - https://imset9.686178.xyz | sh
# ------ a-Shell ------
# sh -c 'curl -sL -o imset9.sh https://imset9.686178.xyz && sh imset9.sh ; rm imset9.sh'
# ================================================================================
@danny8376
danny8376 / read.amazon.co.jp-darkmode.user.css
Last active October 6, 2024 08:33
Dark Mode for read.amazon.co.jp
/* ==UserStyle==
@name read.amazon.co.jp Dark Mode
@namespace saru.moe/userstyles/read.amazon.co.jp
@version 0.1.0
@description Dark Mode for read.amazon.co.jp
@author DannyAAM
==/UserStyle== */
@-moz-document url-prefix("https://read.amazon.co.jp") {
body,
._21ykqjol8NRHrgKPwlCGFu,
@danny8376
danny8376 / path-try-additional-ext.inc.sh
Created September 29, 2024 18:12
Try additional file extensions in msys2 shell (bash/zsh currently)
path_try_additional_ext_find_names() {
local fn="$1" result=()
shift
result+=("(" "-name" "$fn.$1")
shift
while (( $# )); do
result+=("-o" "-name" "$fn.$1")
shift
done
result+=(")")
@danny8376
danny8376 / rbenv-wrapper.inc.sh
Last active September 2, 2024 16:37
rbenv for Windows helper stuff
if [[ -z "$RBENV_INIT" ]]; then
export RBENV_SYSTEM_RUBY=$( powershell -Command '& {& "$env:RBENV_ROOT\rbenv\bin\rbenv.ps1" init *> $null ; echo $env:RBENV_SYSTEM_RUBY}' )
export PATH="$RBENV_ROOT/rbenv/bin":"$RBENV_ROOT/shims":$PATH
if [[ -n "$RUBYLIB" ]]; then
export RUBYLIB="$RUBYLIB":"$RBENV_ROOT/rbenv/share"
else
export RUBYLIB="$RBENV_ROOT/rbenv/share"
fi
@danny8376
danny8376 / encrypt-swaps
Created August 30, 2024 13:01
Mainly for enabling swap encryption in WSL2?
#!/usr/bin/bash
mapfile -t swaps < <(cat /proc/swaps | awk '/^\/dev\// && /partition/ { print $1 }')
for swap in "${swaps[@]}"; do
swapoff "$swap"
name="swap-$(echo "$swap" | cut -c 6- | tr '/ ' '_-')"
cryptsetup plainOpen --batch-mode --cipher aes-xts-plain64 --key-size 512 --sector-size 4096 --key-file=/dev/urandom "$swap" "$name"
mkswap "/dev/mapper/$name" > /dev/null
swapon "/dev/mapper/$name"
done
@danny8376
danny8376 / MessageLoggerV2-HeavyDutySaving.js
Last active June 3, 2025 14:55
My modified MessageLoggerV2
/**
* @name MessageLoggerV2
* MOVED TO https://github.com/danny8376/1LightyBetterDiscordPlugins/blob/heavy-duty-saving/Plugins/MessageLoggerV2/MessageLoggerV2.plugin.js
*/
#!/usr/bin/env bash
l="/ip4/127.0.0.1/tcp/5001"
c="/ip4/127.0.0.1/tcp/9095"
ipfs="/usr/bin/ipfs"
if [[ "$@" =~ "--api" ]]; then
$ipfs "$@"
elif [[ "$1" = "--local" || "$1" = "-L" ]]; then
shift
$ipfs --api "$l" "$@"
Put corrupted OTP (named otp.mem, same as GodMode9 name) in the same location, run it, then the fixed OTP will be named otp_fixed.mem (will still write it even nothing is fixed)
#!/bin/sh
DELAY=1
PID=0
trap_int() {
if [ "$PID" = "0" ]; then
exit
else