Skip to content

Instantly share code, notes, and snippets.


萧易客 Shawyeok

View GitHub Profile
import com.fasterxml.jackson.annotation.*;
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.databind.*;
import com.fasterxml.jackson.databind.jsontype.TypeResolverBuilder;
import io.lettuce.core.codec.RedisCodec;
import io.lettuce.core.codec.Utf8StringCodec;
import javax.xml.datatype.XMLGregorianCalendar;
import java.nio.ByteBuffer;
Shawyeok / hs_err_pid7.log
Created Nov 6, 2019
JVM crashed with SIGSEGV C2 java.lang.StringBuilder.append
View hs_err_pid7.log
# A fatal error has been detected by the Java Runtime Environment:
# SIGSEGV (0xb) at pc=0x00007f5665fef9be, pid=7, tid=0x00007f56574c3700
# JRE version: Java(TM) SE Runtime Environment (8.0_191-b12) (build 1.8.0_191-b12)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.191-b12 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# J 6022 C2 java.lang.StringBuilder.append(Ljava/lang/String;)Ljava/lang/StringBuilder; (8 bytes) @ 0x00007f5665fef9be [0x00007f5665fef980+0x3e]
Shawyeok / docker-compose.yml
Created Mar 22, 2017
Test docker compose network, only link without ports/expose.
View docker-compose.yml
version: '2.0'
image: busybox
command: [sh, -c, 'echo ping | nc server 1234']
- server
image: busybox
command: [nc, -l, -p, '1234']
Shawyeok /
Created Mar 22, 2017
Expose docker container port to specific IP addresses only
# For example, I have a redis container, I want it only serve for specific IP addresses:,
$ docker run -d -p 6379:6379 redis:2.8
# After start redis container, the iptables looks like this:
$ iptables -t filter -nL
Chain DOCKER (1 references)
target prot opt source destination
ACCEPT tcp -- tcp dpt:6379
# Get the IP address of redis container