Skip to content

Instantly share code, notes, and snippets.

@maanimis
maanimis / vscode-settings.json
Last active February 9, 2026 06:21
vscode-config
{
"workbench.colorTheme": "Shades of Purple (Super Dark)",
"[javascript]": {
"editor.defaultFormatter": "rvest.vs-code-prettier-eslint",
},
"liveServer.settings.donotShowInfoMsg": true,
"git.openRepositoryInParentFolders": "never",
"editor.minimap.showSlider": "always",
"editor.minimap.enabled": false,
"editor.unicodeHighlight.allowedCharacters": {
@kor-bim
kor-bim / youtube_upload_date.user.js
Last active February 5, 2026 16:18
youtube_upload_date
// ==UserScript==
// @name 유튜브 날짜 표시기
// @name:el YouTube Ημερομηνία βίντεο
// @name:nl YouTube Datumweergave
// @name:nb YouTube Datovisning
// @name:da YouTube Datovisning
// @name:de YouTube Datumsanzeige
// @name:ru YouTube Отображение даты
// @name:ro YouTube Afișare dată
// @name:mr YouTube तारीख दर्शक
@Ryaang
Ryaang / gist:1f1dd6caa714e3e4844b545e83bd7b98
Created November 25, 2025 06:11
新服务器安全加固脚本
#!/bin/bash
# Ubuntu 24 安全初始化脚本
# 请以 root 用户运行: sudo bash secure-init.sh
# 1. 输入新用户名
read -p "请输入新用户名: " NEWUSER
adduser $NEWUSER
usermod -aG sudo $NEWUSER
# 2. 输入公钥并写入 authorized_keys
@jejkukany
jejkukany / script.js
Created October 30, 2025 16:36
Updates URL to current Youtube timestamp
// ==UserScript==
// @name YouTube URL Timestamp Updater
// @namespace http://tampermonkey.net/
// @version 2025-10-30
// @description Updates the URL with the current video time without creating duplicates.
// @author You
// @match https://www.youtube.com/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=youtube.com
// @grant none
// @author Daniel Young
@maanimis
maanimis / Function_Class_Hooking_Utility.ts
Last active October 30, 2025 09:06
Provides comprehensive hooking capabilities for functions and classes
/**
* Function and Class Hooking Utility
* Provides comprehensive hooking capabilities for functions and classes
*/
// Types for hook callbacks
type BeforeHook<T extends any[] = any[]> = (...args: T) => void | [...T];
type AfterHook<T = any> = (result: T, ...args: any[]) => T | void;
type ErrorHook = (error: Error, ...args: any[]) => void;
@ircfspace
ircfspace / worker.js
Created September 18, 2025 08:05
Simple GitHub Raw Proxy Worker
export default {
async fetch(request) {
const url = new URL(request.url);
const path = url.pathname.replace(/^\/+/, "");
const parts = path.split("/");
if (parts.length < 4) {
return new Response("Usage: /owner/repo/branch/path/to/file.ext", { status: 400 });
}
const [owner, repo, branch, ...filePathParts] = parts;
const filePath = filePathParts.join("/");
{
// UI
"workbench.iconTheme": "hypernym-icons",
"workbench.colorTheme": "FullstacksJS (Dark)",
"editor.cursorSmoothCaretAnimation": "on",
"editor.cursorBlinking": "smooth",
"editor.fontFamily": "'Monaspace Argon', 'DejaVuSansM Nerd Font', sans",
"editor.codeLensFontFamily": "'Monaspace Argon'",
"editor.inlineSuggest.fontFamily": "'Monaspace Argon'",
"markdown.preview.fontFamily": "'Monaspace Argon'",
@maanimis
maanimis / WebSocketMultiplexer.userscript.js
Last active August 8, 2025 07:47
Intercepts WebSocket connections and creates multiple connections instead of one(with Reconnect)
// ==UserScript==
// @name WebSocket Connection Multiplier+Reconnect
// @namespace http://tampermonkey.net/
// @version 3.1
// @description Intercepts WebSocket connections and creates multiple connections instead of one
// @author maanimis
// @match https://example.com/
// @icon https://www.google.com/s2/favicons?sz=64&domain=example.com
// @grant none
// @run-at document-start
@mrunknown0001
mrunknown0001 / ubuntu_debian_server_security_setup.md
Created July 22, 2025 04:11
Ubuntu/Debian Server Security Setup

Ubuntu/Debian Server Security Setup Guide

Prerequisites

  • Fresh Ubuntu/Debian server installation
  • Root or sudo access
  • Basic familiarity with command line

Step 1: Initial System Update

GMStorage – Advanced Storage Utility for Userscripts

The GMStorage class is an advanced wrapper for Greasemonkey, Tampermonkey, or Violentmonkey storage APIs. It streamlines persistent data management by offering a natural JavaScript object interface with built-in synchronization across tabs, deep object update detection, and robust merging of default values.

Key Features:

  • Natural Read/Write Operations:
    Access and update storage keys as if they were object properties.

  • Deep Proxying for Nested Updates: