Skip to content

Instantly share code, notes, and snippets.

@ninehills
ninehills / chatglm-openai-api.ipynb
Last active April 16, 2024 01:15
chatglm-openai-api.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
/*
* Copyright 2018 Andrei Pangin
*
* This is a specialized Java port of the FlameGraph script available at
* https://github.com/brendangregg/FlameGraph/blob/master/flamegraph.pl
*
* Copyright 2016 Netflix, Inc.
* Copyright 2011 Joyent, Inc. All rights reserved.
* Copyright 2011 Brendan Gregg. All rights reserved.
*
@thomasdarimont
thomasdarimont / readme.md
Last active August 16, 2020 16:04
Small example for overriding native library calls in Java with C and LD_PRELOAD - using System.currentTimeMillis() as an example - PoC Linux only... :)
public class Demo {
    public static void main(String[] args) throws Exception{
        System.out.println("Current time: " + System.currentTimeMillis());
    }
}
javac Demo.java
@arturmkrtchyan
arturmkrtchyan / ObjectHeader32.txt
Last active October 7, 2024 03:11
Java Object Header
|----------------------------------------------------------------------------------------|--------------------|
| Object Header (64 bits) | State |
|-------------------------------------------------------|--------------------------------|--------------------|
| Mark Word (32 bits) | Klass Word (32 bits) | |
|-------------------------------------------------------|--------------------------------|--------------------|
| identity_hashcode:25 | age:4 | biased_lock:1 | lock:2 | OOP to metadata object | Normal |
|-------------------------------------------------------|--------------------------------|--------------------|
| thread:23 | epoch:2 | age:4 | biased_lock:1 | lock:2 | OOP to metadata object | Biased |
|-------------------------------------------------------|--------------------------------|--------------------|
|
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