Skip to content

Instantly share code, notes, and snippets.

View gonzaloserrano's full-sized avatar
☁️
🧑‍💻

Gonzalo Serrano gonzaloserrano

☁️
🧑‍💻
View GitHub Profile
╭─[9:14:29] gonzalo@tribe/~/.vim/bundle/cpsm
( master: ✔
╰─○ sh install.sh
-- The C compiler identification is AppleClang 6.1.0.6020053
-- The CXX compiler identification is AppleClang 6.1.0.6020053
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
╭─[9:16:30] gonzalo@tribe/~/.vim/bundle/cpsm
( master: ✔
╰─○ otool -L $(which vim)
/usr/local/bin/vim:
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1213.0.0)
/usr/lib/libncurses.5.4.dylib (compatibility version 5.4.0, current version 5.4.0)
/usr/lib/libiconv.2.dylib (compatibility version 7.0.0, current version 7.0.0)
/System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa (compatibility version 1.0.0, current version 21.0.0)
/usr/local/lib/liblua.5.2.dylib (compatibility version 5.2.0, current version 5.2.3)
/System/Library/Perl/5.18/darwin-thread-multi-2level/CORE/libperl.dylib (compatibility version 5.18.0, current version 5.18.2)
@gonzaloserrano
gonzaloserrano / log.go
Created August 18, 2015 17:56
logrus wrapper
package log
import (
"fmt"
"github.com/Sirupsen/logrus"
"runtime"
"strings"
)
var logger = logrus.New()
@gonzaloserrano
gonzaloserrano / setup.sh
Last active September 5, 2023 02:55 — forked from Gazler/setup.sh
linux setup for 2M concurrent WS connections with phoenix/cowboy/elixir/erlang
sysctl -w fs.file-max=12000500
sysctl -w fs.nr_open=20000500
ulimit -n 20000000
sysctl -w net.ipv4.tcp_mem='10000000 10000000 10000000'
sysctl -w net.ipv4.tcp_rmem='1024 4096 16384'
sysctl -w net.ipv4.tcp_wmem='1024 4096 16384'
sysctl -w net.core.rmem_max=16384
sysctl -w net.core.wmem_max=16384
wget http://packages.erlang-solutions.com/erlang-solutions_1.0_all.deb
sudo dpkg -i erlang-solutions_1.0_all.deb
package metrics
type dummyMetrics struct{}
func NewDummy() Metrics {
return &dummyMetrics{}
}
func (d *dummyMetrics) Counter(name string, tags ...Tag) Counter {
return &dummyCounter{Name: name, tags: tags}
// RunnerFunc allows using ordinary functions as Runner implementations
type RunnerFunc func(context.Context)
// Run bust be implemented by RunnerFunc to implements Runner
// @todo exaplin why this is a common go idiom
func (h RunnerFunc) Run(ctx context.Context) {
h(ctx)
}
package main
import (
"testing"
"time"
"golang.org/x/net/context"
"github.com/stretchr/testify/assert"
)
@gonzaloserrano
gonzaloserrano / aws-web-console-menu-bar-css
Created April 26, 2016 18:51
CSS tweaks to allow more services in the AWS Web Console menu bar with icons and labels
#nav-shortcutBar .service-label {
display: inline-block;
font-size: 0.8em;
margin: 0;
max-width: 35px;
overflow: hidden;
padding: 0;
}
#nav-shortcutBar li {
@gonzaloserrano
gonzaloserrano / README.md
Created July 31, 2016 17:54 — forked from leonardofed/README.md
A curated list of AWS resources to prepare for the AWS Certifications


A curated list of AWS resources to prepare for the AWS Certifications

A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.


Index:

package supmktkata
// Costs for stuff that costs.
type Costs interface {
Cost() float64
}
// CostsFunc adaptor for Costs.
type CostsFunc func() float64