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
go test -bench=. github.com/gdamore/mangos/test | |
PASS | |
BenchmarkLatencyInp-6 100000 20056 ns/op | |
BenchmarkLatencyIPC-6 20000 100229 ns/op | |
BenchmarkLatencyTCP-6 10000 118770 ns/op | |
BenchmarkLatencyTLS-6 10000 185343 ns/op | |
BenchmarkTPut4kInp-6 200000 6807 ns/op 601.66 MB/s | |
BenchmarkTPut4kIPC-6 300000 6639 ns/op 616.93 MB/s | |
BenchmarkTPut4kTCP-6 200000 12042 ns/op 340.14 MB/s | |
BenchmarkTPut4kTLS-6 100000 15285 ns/op 267.96 MB/s |
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
yum localinstall -y http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm | |
yum install -y mosh | |
echo '<?xml version="1.0" encoding="utf-8"?> <service> <short>mosh</short> <description>mobile shell server</description> <port protocol="udp" port="60000-61000"/></service>' > /etc/firewalld/services/mosh.xml | |
restorecon /etc/firewalld/services/mosh.xml | |
chmod 640 /etc/firewalld/services/mosh.xml | |
firewall-cmd --reload | |
firewall-cmd --permanent --add-service=mosh |
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
yum update -y | |
yum localinstall -y https://foundationdb.com/downloads/token/6af12ae4-e7f6-4200-983a-627cd5f9bd1b/key-value-store/3.0.5/foundationdb-clients-3.0.5-1.el7.x86_64.rpm https://foundationdb.com/downloads/token/6266c756-3c66-4913-8dfd-d234bdf66e79/key-value-store/3.0.5/foundationdb-server-3.0.5-1.el7.x86_64.rpm | |
sudo /usr/lib/foundationdb/make_public.py | |
echo '<?xml version="1.0" encoding="utf-8"?> <service> <short>fdb</short> <description>foundationdb server</description> <port protocol="tcp" port="4500-4600"/></service>' > /etc/firewalld/services/fdb.xml | |
restorecon /etc/firewalld/services/fdb.xml | |
chmod 640 /etc/firewalld/services/fdb.xml | |
firewall-cmd --reload | |
firewall-cmd --permanent --add-service=fdb | |
echo "Drtu0T4S:SdzTe7B4@109.74.5.254:4500,109.74.5.151:4500" > /etc/foundationdb/fdb.cluster |
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
sudo yum update | |
sudo yum install zsh terminator git tig mercurial vim | |
chsh --shell /bin/zsh | |
sudo yum install i3 i3-ipc i3status i3lock | |
ssh-keygen | |
echo "ADD PUBLIC KEY TO GITHUB NOW!" | |
sudo yum install autojump autojump-zsh |
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
/* | |
* Licensed to the Apache Software Foundation (ASF) under one | |
* or more contributor license agreements. See the NOTICE file | |
* distributed with this work for additional information | |
* regarding copyright ownership. The ASF licenses this file | |
* to you under the Apache License, Version 2.0 (the | |
* "License"); you may not use this file except in compliance | |
* with the License. You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 |
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
'.active.pane': | |
'ctrl-;': 'gocode:toggle' | |
'.autocomplete-plus input.hidden-input': | |
'enter': 'autocomplete-plus:confirm' | |
'ctrl-k': 'autocomplete-plus:select-next' | |
'ctrl-j': 'autocomplete-plus:select-previous' |
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
Now we setup a workspace by doing the following: | |
- Install Go as described in <http://golang.org/doc/install> | |
- Open an terminal and change the directory to your `$HOME` dir (My Documents for Windows). | |
- Create a new directory called `go` and add the following 3 folders to is: `src`, `pkg` and `bin`. | |
- Add an environment variable `GOPATH` with the value `$HOME/go`. | |
- Get the workshop code by executing: `go get github.com/pjvds/goworkshop`. The code will be located in `$GOPATH/src/github.com/pjvds/goworkshop` | |
- `cd` into that directory and open the `readme`. | |
https://github.com/pjvds/goworkshop/archive/master.zip |
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
initialize: function() { | |
_.bindAll(this, 'detect_scroll'); | |
// bind to window | |
$(window).scroll(this.detect_scroll); | |
} |
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
func sleepSort(input []int) []int { | |
length := len(input) | |
sorting := make(chan int) | |
for i := 0; i < length; i++ { | |
go func(n int) { | |
time.Sleep(time.Duration(n) * time.Millisecond * slack) | |
sorting <- n | |
}(input[i]) | |
} |