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
/** | |
* traceback for cpp | |
* | |
* Created on: 2018-01-27 | |
* Author: owent | |
* | |
* Released under the MIT license | |
* | |
* @note Required flag -rdynamic or addr2line to get the function name when using gcc/clang in unix like system | |
* @note Using addr2line -Cfpe <exe_path> [func_addr...] for more detail when using gcc/clang |
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
package pb | |
import ( | |
"fmt" | |
"reflect" | |
st "github.com/golang/protobuf/ptypes/struct" | |
) | |
// ToStruct converts a map[string]interface{} to a ptypes.Struct |
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
package main | |
import ( | |
"github.com/elazarl/goproxy" | |
"github.com/elazarl/goproxy/ext/auth" | |
"log" | |
"net/http" | |
"flag" | |
) |
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
## Macro title: toc-right | |
## Macro has a body: N | |
## | |
## Developed by: Benjamin DUPUIS | |
## Date created: 05/08/2011 | |
## Date Updated: 30/11/2016 | |
## Installed by: Benjamin DUPUIS | |
## @param Maxlvl:title=MaxLvl|type=int|required=true|desc=Max Level|default=5 | |
## @param Float:title=Float|type=boolean|required=true|desc=Float/Fixed Position|default=true | |
## @param Hidable:title=Hidable|type=boolean|required=true|desc=Hidable (Float menu only)|default=true |
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
package main | |
import ( | |
"database/sql" | |
"fmt" | |
"github.com/go-sql-driver/mysql" | |
"log" | |
"net/http" | |
"strings" | |
"time" |
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
package main | |
import ( | |
"bytes" | |
"compress/flate" | |
"compress/gzip" | |
"compress/zlib" | |
"errors" | |
"fmt" | |
"io/ioutil" |
This page collects common comments made during reviews of Go code, so that a single detailed explanation can be referred to by shorthands. This is a laundry list of common mistakes, not a style guide.
You can view this as a supplement to http://golang.org/doc/effective_go.html.
Please discuss changes before editing this page, even minor ones. Many people have opinions and this is not the place for edit wars.
To remove a submodule you need to:
- Delete the relevant section from the .gitmodules file.
- Stage the .gitmodules changes git add .gitmodules
- Delete the relevant section from .git/config.
- Run git rm --cached path_to_submodule (no trailing slash).
- Run rm -rf .git/modules/path_to_submodule (no trailing slash).
- Commit git commit -m "Removed submodule "
- Delete the now untracked submodule files rm -rf path_to_submodule
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
# atomic update of a key using LUA. | |
EVAL "local t1 = cjson.decode(redis.call('get', ARGV[1])); local t2 = cjson.decode(ARGV[2]); for k,v in pairs(t2) do t1[k] = v end; redis.call('set', ARGV[1], cjson.encode(t1))" 0 "foo" '{"bar": 3}' | |
local id = ARGV[1] | |
local t1 = cjson.decode(redis.call('get', id) | |
local t2 = cjson.decode(ARGV[2]) | |
# merge the new hash with the prior hash. | |
for k,v in pairs(t2) do t1[k] = v end | |
redis.call('set', id, cjson.encode(t1)) |
NewerOlder