Skip to content

Instantly share code, notes, and snippets.

Anselmo Silva anselmo

View GitHub Profile
@anselmo
anselmo / metrics-template.json
Created Jul 23, 2016 — forked from tegud/metrics-template.json
Template for using Elasticsearch as a Time Series Database
View metrics-template.json
{
"metrics" : {
"order" : 0,
"template" : "metrics-*",
"settings" : {
"index" : {
"refresh_interval" : "5s"
}
},
"mappings" : {
@anselmo
anselmo / elasticsearch-cheatsheet.txt
Created Jul 15, 2016 — forked from stephen-puiszis/elasticsearch-cheatsheet.txt
Elasticsearch Cheatsheet - An Overview of Commonly Used Elasticsearch API Endpoints and What They Do
View elasticsearch-cheatsheet.txt
# Elasticsearch Cheatsheet - an overview of commonly used Elasticsearch API commands
# cat paths
/_cat/allocation
/_cat/shards
/_cat/shards/{index}
/_cat/master
/_cat/nodes
/_cat/indices
/_cat/indices/{index}
View bootstrap.sh
brew cask install google-chrome
brew cask install firefox
brew cask install skype
brew cask install spotify
brew cask install iterm2
brew cask install atom
brew cask install virtualbox --appdir=/Applications
brew install azukiapp/azk/azk
@anselmo
anselmo / gist:d679ab46ffb9353709ef365ecc0cef74
Created May 30, 2016 — forked from cb372/gist:1d7b1abbbf0c643f2903
Using Elasticsearch as a Spark data source
View gist:d679ab46ffb9353709ef365ecc0cef74

Install the essentials.

$ brew update && brew install elasticsearch && brew install apache-spark

Start ES.

$ elasticsearch
View tmux-cheatsheet.markdown

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
View index.html
<!DOCTYPE html>
<html>
<head>
<script src="http://cdnjs.cloudflare.com/ajax/libs/q.js/1.0.1/q.js"></script>
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body>
<script id="jsbin-javascript">
View introrx.md

The introduction to Reactive Programming you've been missing

(by @andrestaltz)

So you're curious in learning this new thing called (Functional) Reactive Programming (FRP).

Learning it is hard, even harder by the lack of good material. When I started, I tried looking for tutorials. I found only a handful of practical guides, but they just scratched the surface and never tackled the challenge of building the whole architecture around it. Library documentations often don't help when you're trying to understand some function. I mean, honestly, look at this:

Rx.Observable.prototype.flatMapLatest(selector, [thisArg])

Projects each element of an observable sequence into a new sequence of observable sequences by incorporating the element's index and then transforms an observable sequence of observable sequences into an observable sequence producing values only from the most recent observable sequence.

View tmux-cheatsheet.markdown

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
View Install_tmux
# First install tmux
brew install tmux
# For mouse support (for switching panes and windows)
# Only needed if you are using Terminal.app (iTerm has mouse support)
Install http://www.culater.net/software/SIMBL/SIMBL.php
Then install https://bitheap.org/mouseterm/
# More on mouse support http://floriancrouzat.net/2010/07/run-tmux-with-mouse-support-in-mac-os-x-terminal-app/
@anselmo
anselmo / gist:5930858
Last active Dec 19, 2015
.vimrc - quick vim config
View gist:5930858
filetype on
filetype off
filetype plugin indent on
set nocompatible
set encoding=utf-8
set modelines=0
set scrolloff=3
set autoindent
set showmode
set showcmd
You can’t perform that action at this time.