Skip to content

Instantly share code, notes, and snippets.

View yc-w-cn's full-sized avatar

YC.W yc-w-cn

View GitHub Profile
@yc-w-cn
yc-w-cn / decompile_missing_java.sh
Last active June 18, 2024 02:56
use fernflower.jar to batch decompile class files
#!/bin/bash
# 设置源目录和目标目录
SRC_DIR="/path/to/src"
FF_JAR="/path/to/fernflower.jar"
# 遍历源目录下的所有.class文件
find "$SRC_DIR" -type f -name "*.class" | while read -r class_file; do
# 获取文件的目录路径
dir_path=$(dirname "$class_file")
@yc-w-cn
yc-w-cn / git_stats.sh
Created June 16, 2024 03:31
git 统计某日期的代码变更数量
#!/bin/bash
# Usage Example: ./git_stats.sh "2024-06-15"
# 检查是否有参数传入
if [ "$#" -ne 1 ]; then
echo "Usage: $0 <YYYY-MM-DD>"
exit 1
fi
git config --global https.proxy http://127.0.0.1:1080
git config --global https.proxy https://127.0.0.1:1080
git config --global --unset http.proxy
git config --global --unset https.proxy
npm config delete proxy
git config --global https.proxy http://127.0.0.1:1080
git config --global https.proxy https://127.0.0.1:1080
git config --global --unset http.proxy
git config --global --unset https.proxy
npm config delete proxy
@yc-w-cn
yc-w-cn / 0_reuse_code.js
Created June 26, 2017 00:41
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console