Skip to content

Instantly share code, notes, and snippets.

View henrysher's full-sized avatar
💭
I may be slow to respond.

Henry Huang henrysher

💭
I may be slow to respond.
View GitHub Profile
Code Transfer
Improvement
1. Staging info (大清理), Production (read) – Henry, wiki (to be updated) shared with us
2. ZMonitor and PMonitor(splunk) detail logging (and presented in the ops-portal) – Junyu, Jim
3. API rate exceed(staging, an/beta) – Henry, AWS support
4. launch tool的返回值改进 and fixed time sleep – Jim, tune
5. roles.json add regional - Henry
6. AMI tool update with latest packer (into docker) – Henry, Jim
7. S3 Configuration – perl to python, Henry
8. patch tool (local verify) -- Junyu
@henrysher
henrysher / 校园常见传染病.md
Last active August 29, 2015 14:23
校园常见传染病

#校园常见传染病

编辑: Henry Huang

肺结核、病毒性肝炎、流行性感冒、麻疹、水痘、流行性腮腺炎、风疹、猩红热、流行性脑脊髓膜炎、急性流行性结膜炎(俗称:红眼病)、细菌性痢疾、艾滋病、登革热等。

##内容提要 流行性感冒
水痘
风疹

[HYPER INFO 0531 20:54:41 26892 hyperd.go] [:50] The config file is
[HYPER INFO 0531 20:54:41 26892 daemon.go] [:201] The config: kernel=/var/lib/hyper/kernel, initrd=/var/lib/hyper/hyper-initrd.img
[HYPER INFO 0531 20:54:41 26892 daemon.go] [:204] The config: bridge=, ip=
[HYPER INFO 0531 20:54:41 26892 daemon.go] [:207] The config: bios=/var/lib/hyper/bios-qboot.bin, cbfs=/var/lib/hyper/cbfs-qboot.rom
[HYPER INFO 0531 20:54:41 26892 network.go] [:191] bridge exist
[HYPER INFO 0531 20:54:41 26892 iptables.go] [:286] /sbin/iptables, [--wait -t nat -C POSTROUTING -s 192.168.123.1/24 ! -o hyper0 -j MASQUERADE]
[HYPER INFO 0531 20:54:41 26892 iptables.go] [:286] /sbin/iptables, [--wait -t filter -C FORWARD -i hyper0 ! -o hyper0 -j ACCEPT]
[HYPER INFO 0531 20:54:41 26892 iptables.go] [:286] /sbin/iptables, [--wait -t filter -C FORWARD -o hyper0 -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT]
[HYPER INFO 0531 20:54:41 26892 docker.go] [:173] Finish the client request
[HYPER INFO 0531 20:5
{
"name": "myweb",
"containers" : [{
"image": "httpd",
"ports": [{
"containerPort": 80,
"hostPort": 8080
}]
}],
"resource": {
@henrysher
henrysher / TwentyBot
Last active August 29, 2015 14:21 — forked from CodyWalker/TwentyBot
function countPieces() {
it = b.pieces();
var i = 0;
while (it.current()){ i++; it.next() }
return i;
}
function getRandPiece() {
var it = b.pieces();
var n = Math.floor(Math.random()*countPieces());
@henrysher
henrysher / CVE-2015-0235.c
Created January 28, 2015 09:22
CVE-2015-0235
#include <netdb.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#define CANARY "in_the_coal_mine"
struct {
char buffer[1024];
@henrysher
henrysher / lsof.output
Created August 28, 2014 05:32
lsof python2.7 hanging
python2.7 22018 root cwd DIR 202,65 4096 131409 /root
python2.7 22018 root rtd DIR 202,65 4096 2 /
python2.7 22018 root txt REG 202,65 4864 533667 /usr/local/bin/python2.7
python2.7 22018 root mem REG 202,65 26144 659598 /usr/local/lib/python2.7/lib-dynload/strop.so
python2.7 22018 root mem REG 202,65 22240 659556 /usr/local/lib/python2.7/lib-dynload/_heapq.so
python2.7 22018 root mem REG 202,65 9904 659539 /usr/local/lib/python2.7/lib-dynload/_bisect.so
python2.7 22018 root mem REG 202,65 60872 659585 /usr/local/lib/python2.7/lib-dynload/itertools.so
python2.7 22018 root mem REG 202,65 41968 659590 /usr/local/lib/python2.7/lib-dynload/operator.so
python2.7 22018 root mem REG 202,65 33576 659547 /usr/local/lib/python2.7/lib-dy
@henrysher
henrysher / gdb.output
Created August 28, 2014 05:32
gdb python2.7 hanging
(gdb) bt
#0 0x00007f6bae720bed in ?? () from /usr/local/lib/libpython2.7.so.1.0
#1 0x00007f6bae7215c2 in PyDict_GetItem () from /usr/local/lib/libpython2.7.so.1.0
#2 0x00007f6bae730c76 in PyString_InternInPlace () from /usr/local/lib/libpython2.7.so.1.0
#3 0x00007f6bae7a4002 in ?? () from /usr/local/lib/libpython2.7.so.1.0
#4 0x00007f6bae7a3615 in ?? () from /usr/local/lib/libpython2.7.so.1.0
#5 0x00007f6bae7a37a4 in ?? () from /usr/local/lib/libpython2.7.so.1.0
#6 0x00007f6bae7a3615 in ?? () from /usr/local/lib/libpython2.7.so.1.0
#7 0x00007f6bae7a377c in ?? () from /usr/local/lib/libpython2.7.so.1.0
#8 0x00007f6bae7a3615 in ?? () from /usr/local/lib/libpython2.7.so.1.0
@henrysher
henrysher / 0_reuse_code.js
Created July 23, 2014 04:23
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
{
'puppet_install_distributor': {
'display_name': 'Puppet Install Distributor',
'id': 'puppet_install_distributor',
'types': ['puppet_module']
},
'iso_distributor': {
'display_name': 'ISO Distributor',
'id': 'iso_distributor',
'types': ['iso']