Skip to content

Instantly share code, notes, and snippets.

Daniel, Dao Quang Minh dqminh

Block or report user

Report or block dqminh

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:b64099d775d72e584a141a0d20c38a00
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3c1a689..7603e6e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -25,7 +25,8 @@ option(JAEGERTRACING_WARNINGS_AS_ERRORS "Treat compiler warnings as errors" OFF)
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR
CMAKE_CXX_COMPILER_ID MATCHES "Clang")
- set(cxx_flags -Wall -pedantic)
+ set(cxx_flags -Wall -pedantic -static-libasan -fsanitize=address -fno-omit-frame-pointer)
View bech_zstd_go_test.go
package benchzstd
import (
"bytes"
"io/ioutil"
"testing"
"github.com/DataDog/zstd"
"github.com/valyala/gozstd"
)
View gist:8566588514c6abd48ec05f4082b8a912
❯ sudo cilium status
Allocated IPv4 addresses:
10.1.0.1
10.1.0.2
10.1.0.3
10.1.0.4
10.1.0.5
10.1.0.6
10.1.0.7
10.1.0.8
View gist:791f5e24597825a4dd6dfb5d4922a067
zipkin_1 | 2016-04-13 16:56:37.062 ERROR 1 --- [nio-9411-exec-7] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.jooq.exception.DataAccessException: SQL [select distinct `zipkin_spans`.`trace_id` from `zipkin_spans` join `zipkin_annotations` on (`zipkin_spans`.`trace_id` = `zipkin_annotations`.`trace_id` and `zipkin_spans`.`id` = `zipkin_annotations`.`span_id`) where (`zipkin_annotations`.`endpoint_service_name` = ? and `zipkin_spans`.`start_ts` between ? and ?) order by `zipkin_spans`.`start_ts` desc limit ?]; Expression #1 of ORDER BY clause is not in SELECT list, references column 'zipkin.zipkin_spans.start_ts' which is not in SELECT list; this is incompatible with DISTINCT] with root cause
zipkin_1 |
zipkin_1 | org.mariadb.jdbc.internal.util.dao.QueryException: Expression #1 of ORDER BY clause is not in SELECT list, references column 'zipkin.zipkin_spans.start_ts' which
View gist:6708703
func PublicMethod() {
someFunc("hello")
}
func someFunc(a String) {
}
func TestStuff(t *testing.T) {
someFunc = func(a String) {
}
@dqminh
dqminh / docker client
Last active Dec 22, 2015
`docker push` timed out
View docker client
Pushing 75d01c1a488526899c15031b5c93d098680a73d31062662a9a58460f81cc34c9
2013/09/04 21:28:51 Received HTTP code 504 while uploading layer: <html>
<head><title>504 Gateway Time-out</title></head>
<body bgcolor="white">
<center><h1>504 Gateway Time-out</h1></center>
<hr><center>nginx/1.4.2</center>
</body>
</html>
@dqminh
dqminh / access.log
Created Sep 3, 2013
docker private registry + nginx basic auth
View access.log
10.143.7.175 - - [02/Sep/2013:04:08:22 +0000] "GET /v1/_ping HTTP/1.1" 200 4 "-" "Go 1.1 package http" "-"
10.143.7.175 - - [02/Sep/2013:04:08:32 +0000] "POST /v1/users/ HTTP/1.1" 201 14 "-" "Go 1.1 package http" "-"
10.143.7.175 - - [02/Sep/2013:04:08:32 +0000] "GET /v1/_ping HTTP/1.1" 200 4 "-" "Go 1.1 package http" "-"
10.143.7.175 - docker [02/Sep/2013:04:08:32 +0000] "PUT /v1/repositories/test/essential/ HTTP/1.1" 200 2 "-" "go/go1.1.1 kernel/3.8.0-29-generic" "-"
10.143.7.175 - - [02/Sep/2013:04:08:32 +0000] "GET /v1/images/8dbd9e392a964056420e5d58ca5cc376ef18e2de93b5cc90e868a1bbc8318c1c/json HTTP/1.1" 401 194 "-" "go/go1.1.1 kernel/3.8.0-29-generic" "-"
10.143.7.175 - - [02/Sep/2013:04:08:32 +0000] "PUT /v1/images/8dbd9e392a964056420e5d58ca5cc376ef18e2de93b5cc90e868a1bbc8318c1c/json HTTP/1.1" 401 194 "-" "go/go1.1.1 kernel/3.8.0-29-generic" "-"
View reset docker
pkill docker
iptables -t nat -F
ifconfig docker0 down
brctl delbr docker0
docker -d
@dqminh
dqminh / applause_formatter.rb
Last active Dec 18, 2015
rspec formatter that applause you when your tests pass
View applause_formatter.rb
require "rspec/core/formatters/progress_formatter"
class ApplauseFormatter < RSpec::Core::Formatters::ProgressFormatter
def initialize(output)
super(output)
unless File.exists? "/tmp/applause.mp3"
p "Downloading applause for awesomeness"
system "wget http://www.soundjay.com/human/applause-1.mp3 -O /tmp/applause.mp3"
end
end
@dqminh
dqminh / christmas.tree
Created Dec 5, 2011
We want this tree
View christmas.tree
$
:$$
seeee$$$Neeee
R$$$F$$$$F
$$$$$$
@$$P*$$B
z$#" $#$b
" d 'N "
@" ?r
xF . "N
You can’t perform that action at this time.