Skip to content

Instantly share code, notes, and snippets.

Tomás Senart tsenart

Block or report user

Report or block tsenart

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:bad59caf9a41e55ea8347c43d2c11719
Fetching sources...
Solving failure: No versions of github.com/golang-migrate/migrate met constraints:
v4.2.1: Could not introduce github.com/golang-migrate/migrate@v4.2.1 due to multiple problematic subpackages:
Subpackage github.com/golang-migrate/migrate/v4/database/postgres is missing. (Package is required by (root).) Subpackage github.com/golang-migrate/migrate/v4/database/ql is missing. (Package is required by (root).) Subpackage github.com/golang-migrate/migrate/v4/internal/cli is missing. (Package is required by (root).) Subpackage github.com/golang-migrate/migrate/v4/source/stub is missing. (Package is required by (root).) Subpackage github.com/golang-migrate/migrate/v4/database/clickhouse is missing. (Package is required by (root).) Subpackage github.com/golang-migrate/migrate/v4/database/cockroachdb is missing. (Package is required by (root).) Subpackage github.com/golang-migrate/migrate/v4/database/mongodb is missing. (Package is required by (root).) Subpackage github.com/golang-migrate/migrate
View gist:3cb026aa5705d7a2db14ddc610a2a8d2
--- FAIL: TestWithInstance_Concurrent (0.00s)
dktesting.go:27: Skipping postgres:9.6 in short mode
dktesting.go:27: Skipping postgres:9.5 in short mode
dktesting.go:27: Skipping postgres:9.4 in short mode
dktesting.go:27: Skipping postgres:9.3 in short mode
--- FAIL: TestWithInstance_Concurrent/postgres:10 (15.49s)
dktest.go:36: Pulling image: postgres:10
dktest.go:52: Image pull response: 10: Pulling from library/postgres
Digest: sha256:39d1f28ccac92c0c2b7f3f486988599406ae7b9e8f229021c8d76d492f506d8e
Status: Image is up to date for postgres:10
View gist:0f22511d73ea1c79a833892451d177c9
rails:master λ orbaclerun -d . index
I, [2018-12-14T19:53:15.898905 #43432] INFO -- : Reading...
I, [2018-12-14T19:53:15.978461 #43432] INFO -- : Parsing...
W, [2018-12-14T19:53:16.519625 #43432] WARN -- : Warning: Skipped ./actionpack/test/dispatch/request_test.rb because of Orbacle::RubyParser::SyntaxError
W, [2018-12-14T19:53:18.380762 #43432] WARN -- : Warning: Skipped ./actionpack/test/controller/parameter_encoding_test.rb because of Orbacle::RubyParser::SyntaxError
W, [2018-12-14T19:53:20.711887 #43432] WARN -- : Warning: Skipped ./activesupport/test/message_verifier_test.rb because of Orbacle::RubyParser::SyntaxError
W, [2018-12-14T19:53:20.888659 #43432] WARN -- : Warning: Skipped ./activesupport/test/logger_test.rb because of Orbacle::RubyParser::SyntaxError
W, [2018-12-14T19:53:20.914131 #43432] WARN -- : Warning: Skipped ./activesupport/test/inflector_test_cases.rb because of Orbacle::RubyParser::SyntaxError
W, [2018-12-14T19:53:21.048705 #43432] WARN -- : Warning: Skipped ./activesupport/t
@tsenart
tsenart / 00_go_output.txt
Last active Oct 31, 2018
Quantum effects
View 00_go_output.txt
10/s: min: 454ns max: 5.341µs 0.50: 711ns 0.90: 1.042µs 0.95: 1.223µs 0.99: 4.173µs
50/s: min: 278ns max: 76.968µs 0.50: 768ns 0.90: 1.306µs 0.95: 2.956µs 0.99: 5.596µs
100/s: min: 193ns max: 41.241µs 0.50: 712ns 0.90: 1.136µs 0.95: 1.614µs 0.99: 4.393µs
500/s: min: 148ns max: 21.488µs 0.50: 721ns 0.90: 1.003µs 0.95: 1.086µs 0.99: 3.061µs
1000/s: min: 137ns max: 44.32µs 0.50: 735ns 0.90: 1.009µs 0.95: 1.069µs 0.99: 2.682µs
5000/s: min: 109ns max: 11.757µs 0.50: 348ns 0.90: 374ns 0.95: 398ns 0.99: 491ns
10000/s: min: 109ns max: 22.745µs 0.50: 348ns 0.90: 371ns 0.95: 384ns 0.99: 478ns
View keybase.md

Keybase proof

I hereby claim:

  • I am tsenart on github.
  • I am tsenart (https://keybase.io/tsenart) on keybase.
  • I have a public key ASCTVMASbwcrxQkF4RUCL8_Yn_vCYX9lfjjag18hdoVBcwo

To claim this, I am signing this object:

View before.go
var sleep time.Duration
known := map[string]struct{}{}
for {
time.Sleep(sleep)
ips, _ := readIPs("ips.json")
for _, ip := range ips {
if _, ok := known[ip]; !ok {
known[ip] = struct{}{}
doSomething(ip)
}
View gist:7936f6086a9d1df600fa
λ ~/go/src/github.com/mesosphere/RENDLER/go/src/github.com/mesosphere/rendler/ master golint .
edge.go:7:6: exported type Edge should have comment or be unexported
export_dot.go:16:1: exported function WriteDOTFile should have comment or be unexported
export_dot.go:38:3: don't use underscores in Go names; var hash_bytes should be hashBytes
export_dot.go:58:3: don't use underscores in Go names; var from_hash_bytes should be fromHashBytes
export_dot.go:59:3: don't use underscores in Go names; var from_hash should be fromHash
export_dot.go:62:3: don't use underscores in Go names; var to_hash_bytes should be toHashBytes
export_dot.go:63:3: don't use underscores in Go names; var to_hash should be toHash
results.go:8:1: comment on exported type CrawlResult should be of the form "CrawlResult ..." (with optional leading article)
results.go:15:1: exported method CrawlResult.FromJson should have comment or be unexported
View gist:377563923d300c5a5f64
diff --git a/log/value.go b/log/value.go
index f2c55b7..ba622da 100644
--- a/log/value.go
+++ b/log/value.go
@@ -11,12 +11,10 @@ type Value interface{}
// A Valuer generates a log value. When passed to With, it represents a
// dynamic value which is re-evaluated with each log event.
-type Valuer interface {
- // Value returns a log Value instead of an interface{} to avoid
View gist:80fdfa09206d5d46f1ca
diff --git a/log/value.go b/log/value.go
index f2c55b7..4351586 100644
--- a/log/value.go
+++ b/log/value.go
@@ -18,6 +18,12 @@ type Valuer interface {
Value() Value
}
+// ValuerFunc is an adapter func type that implements the Valuer interface.
+type ValuerFunc func() Value
View gist:5fc18c659814c078378d
package main
import (
"net/http"
"database/sql"
"fmt"
"log"
"os"
)
You can’t perform that action at this time.