Skip to content

Instantly share code, notes, and snippets.

View chenchun's full-sized avatar
🦖
go for{vacation()}

Chun Chen chenchun

🦖
go for{vacation()}
View GitHub Profile
## ip address info
root@6f62c03f8f5a:/go/src/github.com/docker/libnetwork# ip ad
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: br-55bac522026e: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default
link/ether 02:42:b4:4b:95:ee brd ff:ff:ff:ff:ff:ff
@chenchun
chenchun / 0_reuse_code.js
Created October 21, 2015 02:08
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
@chenchun
chenchun / .tmux.conf
Last active January 22, 2017 08:58
linux tmux session remember script
# bind Ctrl-a as command prefix
set -g prefix C-a
unbind C-b
bind-key -r Space next-layout
bind ^z run "tmux-zoom"
@chenchun
chenchun / get_ip.sh
Last active August 29, 2015 14:10 — forked from hex108/get_ip.sh
#!/bin/bash
# Get IP for specified host using 'http://ping.eu/ping', then write it to hosts.
if [ $# -ne 1 ]; then
echo "Usage: $0 host"
echo " e.g. # $0 baidu.com"
exit 0
fi
import java.io.*;
import java.util.*;
import sun.jvm.hotspot.memory.*;
import sun.jvm.hotspot.oops.*;
import sun.jvm.hotspot.debugger.*;
import sun.jvm.hotspot.runtime.*;
import sun.jvm.hotspot.tools.*;
import sun.jvm.hotspot.utilities.*;
public class DirectMemorySize extends Tool {
@chenchun
chenchun / DumpClassURL.java
Created October 10, 2012 04:03 — forked from rednaxelafx/DumpClassURL.java
Using the ProtectionDomain of an InstanceKlass to see where it was loaded from
import java.io.*;
import java.util.*;
import sun.jvm.hotspot.memory.*;
import sun.jvm.hotspot.oops.*;
import sun.jvm.hotspot.debugger.*;
import sun.jvm.hotspot.runtime.*;
import sun.jvm.hotspot.tools.*;
public class DumpClassURL extends Tool {
public void run() {