Hi!
View README.md
golang 结构体内部变量被引用实验
结论
struct 的某个 filed 被引用的时候 struct 本身就不会被垃圾回收器回收。
操作步骤
$ go run memtest.go -cpuprofile cpu.pprof -memprofile mem.pprof
View pre-commit
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
exit_code=0 | |
goimports_fix() { | |
hash goimports 2>&- || { echo >&2 "goimports not in PATH."; exit 1; } | |
for file in `git diff --cached --name-only --diff-filter=d | grep -v vendor | grep '\.go$'` | |
do | |
if [[ ! -z `git diff --name-only ${file} | grep '\.go$'` ]] |
View decoded-binlog-sample.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=1*/; | |
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; | |
DELIMITER /*!*/; | |
# at 4 | |
#190521 22:03:48 server id 1 end_log_pos 123 CRC32 0x9a9ea66e Start: binlog v 4, server v 5.7.25-28-log created 190521 22:03:48 at startup | |
# Warning: this binlog is either in use or was not closed properly. | |
ROLLBACK/*!*/; | |
# at 123 | |
#190521 22:03:48 server id 1 end_log_pos 154 CRC32 0xc13e82af Previous-GTIDs | |
# [empty] |
View pinyin-to-emoji.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"e":"🐊","ai":"❤️","er":"👂","ba":"🎱","bo":"🍍","bi":"🖋","bu":"🙅♂️","bai":"💯","bao":"🎒","ban":"🔧","bang":"🍭","bei":"🐚","ben":"📒","biao":"⌚️","bian":"🦇","bie":"🧷","bin":"🍾","bing":"🍧","pa":"👏","pi":"🍺","pu":"🍇","pai":"🏓","pao":"🏃♂️","pan":"🍽","pen":"⛲️","peng":"⛺️","piao":"🐞","pin":"🧩","ping":"🍎","ma":"🐴","mo":"🍄","mi":"🍯","mai":"🎙","mao":"🐈","man":"🈵","mang":"🥭","mei":"🍓","men":"🚪","meng":"🍋","miao":"🐱","mian":"🍜","mie":"🧯","fa":"👩⚖️","fu":"🗻","fan":"🍚","fang":"🏠","fei":"✈️","feng":"🐝","da":"🖨","de":"🉐","di":"🌎","du":"🦄","dai":"🦘","dao":"🔪","dan":"🥚","dong":"🕳","deng":"💡","diao":"🎣","dian":"⚡️","die":"🦋","ding":"🔝","dui":"✔️","dun":"🛡","ta":"🗼","tu":"🐇","tai":"☯️","tao":"🍑","tang":"🍬","tong":"🛢","tiao":"💃","tian":"😛","tie":"🛤","ting":"⏹","tuan":"🍙","tui":"🦵","tun":"🐬","tuo":"🐪","nv":"🚺","nai":"🍼","nao":"🧠","nan":"🚹","nang":"💊","nong":"👩🌾","nei":"👙","niao":"🐦","niu":"🐂","ning":"🍋","niang":"👰","la":"🌶","li":"🍐","lu":"🦌","lv":"💚","lao":"🧀","lan":"🏀","lang":"🐺","lou":"🏢","long":"🐉","lei":"⚡️","leng":"🥶","lian": |
View reminder.md
check list
/remind list
“@channel to do something”
/remind # @channel Time to go eat lunch 12:15 every weekday
View atfield.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding: utf-8 | |
import functools | |
import time | |
from threading import local | |
from collections import deque | |
class ATFieldException(Exception): | |
pass |
View weapp_msgs.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 从小程序进入客服消息会话(明文 + 加密模式) | |
{ | |
"ToUserName": "gh_eeeeeeeeeeee", | |
"FromUserName": "o222222222222222222222222222", | |
"CreateTime": 1520836271, | |
"MsgType": "event", | |
"Event": "user_enter_tempsession", | |
"SessionFrom": "...", | |
"Encrypt": "oMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM=" | |
} |
View xiaoe-miniapp-app-config.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"page": { | |
"page/home/home_index/home_index.html": { | |
"window": { | |
"navigationBarTitleText": "首页", | |
"enablePullDownRefresh": true | |
} | |
}, | |
"page/home/message/message.html": { | |
"window": { |
View wechat_mp_msgs.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 本来的数据是 XML 的,手动转换成了 json 格式 | |
// 文本消息 | |
{ | |
"ToUserName": "gh_555555555555", | |
"FromUserName": "o3QQQQQQQQQQQQQQQQQQQQQQQQQQ", | |
"CreateTime": "1520247736", | |
"MsgType": "text", | |
"Content": "红包", | |
"MsgId": "6529414308333333333" |
NewerOlder