Skip to content

Instantly share code, notes, and snippets.

@xwell
xwell / ObjectHeader32.txt
Created February 26, 2020 03:05 — forked from arturmkrtchyan/ObjectHeader32.txt
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 |
|-------------------------------------------------------|--------------------------------|--------------------|
|
@xwell
xwell / config.yml
Created November 7, 2019 14:59 — forked from anonymous/config.yml
flexget config
#使用前请将注释删除以免出问题。#后面带汉字的就是注释
#如果不想启用 Web-UI 则删除本段代码
web_server:
bind: 0.0.0.0
port: 50001 #web-ui的监听端口
# ssl_certificate: '/etc/ssl/private/myCert.pem' #SSL证书位置,启用https的话,把前面的#号删除
# ssl_private_key: '/etc/ssl/private/myKey.key' #SSL证书位置,启用https的话,把前面的#号删除
web_ui: yes #启用web-ui
base_url: /flex #网址后缀
run_v2: yes #启动 V2 版本
@xwell
xwell / binarytree.gvpr
Created June 23, 2019 07:58 — forked from Sciss/binarytree.gvpr
GraphViz formatting script for binary trees
// from Emden Gansner
// https://mailman.research.att.com/pipermail/graphviz-interest/2010q2/007101.html
// requires GraphViz 2.28.0 (fails with 2.26.3 at least)
BEGIN {
double tw[node_t]; // width of tree rooted at node
double nw[node_t]; // width of node
double xoff[node_t]; // x offset of root from left side of its tree
double sp = 36; // extra space between left and right subtrees
double wd, w, w1, w2;
double x, y, z;
@xwell
xwell / redis.conf
Last active May 21, 2019 14:25
redis 5.0.5
protected-mode no
# bindIp 127.0.0.1
port 6379
tcp-backlog 511
timeout 0
tcp-keepalive 300
daemonize yes
supervised no
pidfile /var/run/redis_6379.pid
loglevel notice