Skip to content

Instantly share code, notes, and snippets.



  • Beijing,China
View GitHub Profile
bxcodec / _struct_to_map.go
Last active Aug 13, 2020
Golang Struct To Map Example By JSON tag
View _struct_to_map.go
This function will help you to convert your object from struct to map[string]interface{} based on your JSON tag in your structs.
Example how to use posted in sample_test.go file.
func structToMap(item interface{}) map[string]interface{} {
res := map[string]interface{}{}
if item == nil {
return res
View example.go
package main
import (
_ ""
ryerh / tmux-cheatsheet.markdown
Last active Aug 14, 2020 — forked from MohamedAlaa/tmux-cheatsheet.markdown
Tmux 快捷键 & 速查表 & 简明教程
View tmux-cheatsheet.markdown

注意:本文内容适用于 Tmux 2.3 及以上的版本,但是绝大部分的特性低版本也都适用,鼠标支持、VI 模式、插件管理在低版本可能会与本文不兼容。

Tmux 快捷键 & 速查表 & 简明教程


tmux [new -s 会话名 -n 窗口名]


stupidbodo / aes_encryption.go
Last active Jul 27, 2020
AES Encryption Example in Golang
View aes_encryption.go
// Playbook -
package main
import (
mattetti / multipart_upload.go
Last active Aug 14, 2020
Example of doing a multipart upload in Go (golang)
View multipart_upload.go
package main
import (
aeurielesn / util.php
Created Jul 31, 2011
Decode Unicode strings in PHP
View util.php
function replace_unicode_escape_sequence($match) {
return mb_convert_encoding(pack('H*', $match[1]), 'UTF-8', 'UCS-2BE');
function unicode_decode($str) {
return preg_replace_callback('/\\\\u([0-9a-f]{4})/i', 'replace_unicode_escape_sequence', $str);
You can’t perform that action at this time.