- package managment: https://github.com/Masterminds/glide
- cross-compiling: https://github.com/mitchellh/gox
- logging: https://github.com/Sirupsen/logrus
- code generation: https://github.com/josharian/impl (interface impl), https://github.com/mholt/curl-to-go, https://github.com/mholt/json-to-go
- memory optimization: http://golang-sizeof.tips/
- repl: https://github.com/motemen/gore
- self-update: https://github.com/inconshreveable/go-update
- json: https://github.com/antonholmquist/jason / https://github.com/a8m/djson
- docs: http://godoc.org/golang.org/x/tools/cmd/godoc
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
# HELP go_gc_duration_seconds A summary of the pause duration of garbage collection cycles. | |
# TYPE go_gc_duration_seconds summary | |
go_gc_duration_seconds{quantile="0"} 0 | |
go_gc_duration_seconds{quantile="0.25"} 0 | |
go_gc_duration_seconds{quantile="0.5"} 0 | |
go_gc_duration_seconds{quantile="0.75"} 0 | |
go_gc_duration_seconds{quantile="1"} 0 | |
go_gc_duration_seconds_sum 0 | |
go_gc_duration_seconds_count 0 | |
# HELP go_goroutines Number of goroutines that currently exist. |
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 weakmap | |
import ( | |
"reflect" | |
"runtime" | |
"sync" | |
) | |
type Key = interface {} | |
type Value = interface {} |
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
#include <malloc.h> | |
#include <string.h> | |
#include <stdio.h> | |
#define for_each(i, list) \ | |
for(i = list; \ | |
i != NULL; \ | |
i = i->next) | |
struct lista { |
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
<project ...> | |
... | |
<properties> | |
<sonar.core.codeCoveragePlugin>jacoco</sonar.core.codeCoveragePlugin> | |
<sonar.dynamicAnalysis>reuseReports</sonar.dynamicAnalysis> | |
<sonar.jacoco.reportPath>${user.dir}/target/jacoco.exec</sonar.jacoco.reportPath> | |
</properties> | |
... | |
<build> | |
<plugins> |
(assuming project is hosted on GitLab)
- Enable shared runners by going to "Settings" > "Runners".
- Add
.gitlab-ci.yml
with the following content:
image: node:6.9.1
pages:
artifacts:
paths:
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
// Usage: | |
// 1. ./mvnw dependency:tree -Dverbose | kotlinc -script mvn-confict-resolver.kts | |
// 2. update pom.xml's | |
// <dependencyManagement><dependencies><!-- INSERT 1. OUTPUT HERE --></dependencies></dependencyManagement> | |
import java.util.Scanner | |
val input = Scanner(System.`in`).useDelimiter("\\A").next() | |
println( | |
Regex("[(]([\\w.-]+:[\\w.-]+:jar:[\\w.-]+):[^ ]+ - omitted for conflict with ([\\w.-]+)") |
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
const amqp = require('amqplib/callback_api') | |
const assert = require('assert') | |
amqp.connect((err, con) => { | |
assert.ifError(err) | |
console.log('connected') | |
con.createChannel((err, ch) => { | |
assert.ifError(err) | |
ch.prefetch(1, false) | |
ch.assertQueue('Q', {durable: false, autoDelete: true, maxLength: 1}, (err) => { |
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
<!doctype html> | |
<title></title> | |
<meta name="description" content=""> | |
<div id="app"></div> | |
<script src="https://unpkg.com/vue"></script> | |
<script src="https://unpkg.com/vue-document"></script> | |
<script> | |
Vue.use(VueDocument, { | |
injector: [VueDocument.titleInjector, VueDocument.metaInjector] | |
}) |
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
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" | |
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<title>canvas-text-opentypejs-shim :: fabric</title> | |
</head> | |
<body> |
NewerOlder