Note: This was written using elasticsearch 0.9.
Elasticsearch will automatically create an index (with basic settings and mappings) for you if you post a first document:
$ curl -X POST 'http://localhost:9200/thegame/weapons/1' -d \
'{
"_id": 1,
Note: This was written using elasticsearch 0.9.
Elasticsearch will automatically create an index (with basic settings and mappings) for you if you post a first document:
$ curl -X POST 'http://localhost:9200/thegame/weapons/1' -d \
'{
"_id": 1,
2016-02-09T17:00:40Z DBG Disable stderr logging | |
2016-02-09T17:00:40Z DBG Initializing output plugins | |
2016-02-09T17:00:40Z INFO GeoIP disabled: No paths were set under output.geoip.paths | |
2016-02-09T17:00:40Z INFO File output base filename set to: dockerbeat | |
2016-02-09T17:00:40Z INFO Rotate every bytes set to: 10485760 | |
2016-02-09T17:00:40Z INFO Number of files set to: 7 | |
2016-02-09T17:00:40Z INFO Activated file as output plugin. | |
2016-02-09T17:00:40Z DBG Create output worker | |
2016-02-09T17:00:40Z DBG No output is defined to store the topology. The server fields might not be filled. | |
2016-02-09T17:00:40Z INFO Publisher name: b1760baa887b |
package future | |
// A Future represents the result of some asynchronous computation. | |
// Future returns the result of the work as an error, or nil if the work | |
// was performed successfully. | |
// Implementers must observe these invariants | |
// 1. There may be multiple concurrent callers, or Future may be called many | |
// times in sequence, it must always return the same value. | |
// 2. Future blocks until the work has been performed. | |
type Future func() error |
... or Why Pipelining Is Not That Easy
Golang Concurrency Patterns for brave and smart.
By @kachayev
call plug#begin() | |
Plug 'kchmck/vim-coffee-script' | |
Plug 'tpope/vim-sensible' | |
Plug 'kien/ctrlp.vim' | |
Plug 'vim-ruby/vim-ruby' | |
Plug 'plasticboy/vim-markdown' | |
Plug 'hdima/python-syntax' | |
Plug 'scrooloose/syntastic' | |
Plug 'tpope/vim-fireplace', { 'for': 'clojure' } | |
Plug 'kovisoft/paredit', { 'for': ['clojure', 'scheme'] } |
Twelve Go Best Practices
Francesc Campoy Flores Gopher at Google @francesc http://campoy.cat/+
The term variance describes how subtyping between higher kinded types is related to subtyping relations of their type arguments.
A higher kinded type composes type arguments to a new type. I use square bracket notation to define a higher kinded type:
C[T] // The higher kinded type `C` composes type argument `T` to a new type `C[T]`.
The same works with multiple type arguments:
I hereby claim:
To claim this, I am signing this object:
originally written in Dec 2011, needs updating
Log analysis has always struck me as one of those things that gets too much superficial attention without enough attention to detail. That is, we know that we need to do it, but we don’t talk about how we need to do it. At best, we talk about making sure we collect and archive logs. Analysis plays second fiddle, even though in reality logs without analysis provide almost no value to an organization. And you’ll find greatest value in discovery of the earliest stages of an incident rather than in hindsight to understand what went wrong. Unfortunately, less than 1% of data breach investigations in the 2011 Verizon DBIR started with log analysis and review!
The analysis ideas I present below don’t even begin to represent a comprehensive view. And of course every network is different, so you will need to think about your specific needs. But this may get
L1 cache reference ......................... 0.5 ns
Branch mispredict ............................ 5 ns
L2 cache reference ........................... 7 ns
Mutex lock/unlock ........................... 25 ns
Main memory reference ...................... 100 ns
Compress 1K bytes with Zippy ............. 3,000 ns = 3 µs
Send 2K bytes over 1 Gbps network ....... 20,000 ns = 20 µs
SSD random read ........................ 150,000 ns = 150 µs
Read 1 MB sequentially from memory ..... 250,000 ns = 250 µs