Skip to content

Instantly share code, notes, and snippets.

View ricky9w's full-sized avatar
🏠
Working from home

Richard Wang ricky9w

🏠
Working from home
View GitHub Profile
@ricky9w
ricky9w / sohu-hide-distractions.user.js
Created March 21, 2025 12:35
Remove Sohu pop-ups and slide-bar ads
// ==UserScript==
// @name Sohu Hide Distractions
// @version 0.1
// @description Remove Sohu pop-ups and slide-bar ads
// @author ricky9w
// @match https://www.sohu.com/a/*
// @grant none
// ==/UserScript==
(function() {
@ricky9w
ricky9w / keep-bilibili-subtitle.js
Created September 3, 2024 07:24
自动记忆并应用哔哩哔哩视频字幕的开关状态,在观看多P视频时保持一致的字幕设置
// ==UserScript==
// @name Bilibili字幕状态记忆
// @namespace http://tampermonkey.net/
// @version 0.4
// @description 自动记忆并应用哔哩哔哩视频字幕的开关状态,在观看多P视频时保持一致的字幕设置
// @author Richard Wang
// @email [email protected]
// @match *://www.bilibili.com/video/*
// ==/UserScript==
@ricky9w
ricky9w / XHS-Downloader.js
Created August 2, 2024 13:45
下载小红书无水印图文/视频作品
// ==UserScript==
// @name XHS-Downloader
// @namespace https://github.com/ricky9w
// @version 1.4.1
// @description 下载小红书无水印图文/视频作品
// @author JoeanAmier (improved and compiled by ricky9w & Claude AI)
// @match http*://www.xiaohongshu.com/*
// @grant GM_getValue
// @grant GM_setValue
// @grant unsafeWindow
@ricky9w
ricky9w / HumidityCalculator.tsx
Created August 1, 2024 20:18
A Next.js component that calculates the amount of water needed to adjust room humidity
import React, { useState } from 'react';
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"
import { Input } from "@/components/ui/input"
import { Button } from "@/components/ui/button"
import { Label } from "@/components/ui/label"
const HumidityCalculator = () => {
const [temperature, setTemperature] = useState('');
const [currentHumidity, setCurrentHumidity] = useState('');
const [targetHumidity, setTargetHumidity] = useState('');
@ricky9w
ricky9w / HideAdsFromGoogleSearch.js
Created July 31, 2024 06:38
Hide 'Sponsored' results from Google search results
// ==UserScript==
// @name Hide Ads From Google Search Page
// @description Hide 'Sponsored' results from Google search results
// @match https://www.google.com/search*
// ==/UserScript==
(function() {
'use strict';
// Function to hide elements
@ricky9w
ricky9w / SohuHideDistractions.js
Created July 19, 2024 07:41
Remove Sohu pop-ups and slide-bar ads
// ==UserScript==
// @name Souhu Hide Distractions
// @version 0.1
// @description Remove Sohu pop-ups and slide-bar ads
// @author ricky9w
// @email [email protected]
// @match https://www.sohu.com/a/*
// @grant none
// ==/UserScript==
@ricky9w
ricky9w / scrollable-to-screenshot.js
Created July 17, 2024 07:23
Create a long screenshot of all elements in a scrollable container
// ==UserScript==
// @name Long Screenshot Creator for Scrollable Container
// @namespace https://rikko.top
// @version 0.1
// @description Create a long screenshot of all elements in a scrollable container
// @author ricky9w
// @email [email protected]
// @match https://*/*
// @grant none
// @require https://cdnjs.cloudflare.com/ajax/libs/html2canvas/1.4.1/html2canvas.min.js
## powerlevel10k and znap
# Initialization code that may require console input (password prompts, [y/n]
# confirmations, etc.) must go above this block; everything else may go below.
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
fi
[[ -r ~/.config/zsh/znap/znap.zsh ]] ||
git clone --depth 1 -- \
https://github.com/marlonrichert/zsh-snap.git ~/.config/zsh/znap
- name: Campus
interface-name: wg0
type: select
proxies:
- DIRECT
---
version: '3'
services:
trojan-go:
image: teddysun/trojan-go:latest
restart: always
volumes:
- ./server.json:/etc/trojan-go/server.json
- ./crt/:/opt/crt/
command: /usr/bin/trojan-go -config /etc/trojan-go/server.json