Skip to content

Instantly share code, notes, and snippets.

View raptium's full-sized avatar
😜

Hao Guan raptium

😜
View GitHub Profile
@raptium
raptium / DebugAdvice.java
Created May 29, 2020 02:11
How to replace input arguments using ByteBuddy's @Advice.AllArguments?
import static net.bytebuddy.matcher.ElementMatchers.is;
import net.bytebuddy.ByteBuddy;
import net.bytebuddy.agent.ByteBuddyAgent;
import net.bytebuddy.agent.builder.AgentBuilder;
import net.bytebuddy.agent.builder.ResettableClassFileTransformer;
import net.bytebuddy.asm.Advice;
import net.bytebuddy.asm.AsmVisitorWrapper;
import net.bytebuddy.implementation.bytecode.assign.Assigner;
import net.bytebuddy.matcher.ElementMatchers;
@raptium
raptium / config.yml
Created September 18, 2021 02:29
k3os config
#cloud-config
ssh_authorized_keys:
- github:raptium
boot_cmd:
- "echo Asia/Shanghai > /etc/timezone"
- "ln -vs /usr/share/zoneinfo/Asia/Shanghai /etc/localtime"
ntp:
pools:
- cn.pool.ntp.org
enabled: true