Instantly share code, notes, and snippets.

View xargs.md

xargs

xargs is really powerful and sometimes allows some one-liners that are easier to write and read than bash loops

Example 1

Deleting many indices from an ElasticSearch cluster, one-by-one.

curl -s localhost:9200/_cat/indices?h=index | \
View BackendDeveloper@CrossEngage.md

Backend Developer (Data-Science team)

CrossEngage is a fast growing Berlin-based marketing technology company backed by several well known VC’s and business angels. Our goal is to innovate the user experience through highly relevant and consistent cross-channel marketing communications. CrossEngage provides a cloud-based, real-time, open marketing platform that empowers marketing managers to intuitively orchestrate their campaigns across all relevant channels and devices.

Your responsibilities:

  • Support the full software development lifecycle from concept, design, and testing.
  • You will work closely with the data science team, writing clean, and testable code.
  • You are proactive and pay attention to quality, scalability, performance, and availability of our systems.
  • You research, and are open-minded to learn new technologies that will improve our products and development flow.
View gist:44b7ffddac6165e75a0c

Setting up Vim as your Go IDE

The final IDE

Intro

I've been wanting to do a serious project in Go. One thing holding me back has been a my working environment. As a huge PyCharm user, I was hoping the Go IDE plugin for IntelliJ IDEA would fit my needs. However, it never felt quite right. After a previous experiment a few years ago using Vim, I knew how powerful it could be if I put in the time to make it so. Luckily there are plugins for almost anything you need to do with Go or what you would expect form and IDE. While this is no where near comprehensive, it will get you writing code, building and testing with the power you would expect from Vim.

Getting Started

I'm assuming you're coming with a clean slate. For me this was OSX so I used MacVim. There is nothing in my config files that assumes this is the case.

View ts-shara.txt
2400 8N1
SEND: Q1
REcv: (129.0 129.0 117.0 032 60.0 28.1 @@.@ 00101001
___________ _____ ___ ____ ____ ____ ________
A B C D E F GHIJKLMN
A- Entrada (V)
B- Saída (V)
C- Corrente (0 a 255%)
View shell_shortcuts.txt
ctrl + a: move cursor to first char
ctrl + e: mode cursor to last char
ctrl + u: cut to the first char
ctrl + k: cut to the last char
ctrl + y: paste the clipboard of ctrl+k or ctrl+u
ctrl + r: history reverse search
ctrl + l: clear screen
ctrl + w: delete word to the left
ctrl + t: swap the last two chars and move cursor to the right
ctrl + v + tab: insert tab in shell
View benchmark+go+nginx.md

Benchmarking Nginx with Go

There are a lot of ways to serve a Go HTTP application. The best choices depend on each use case. Currently nginx looks to be the standard web server for every new project even though there are other great web servers as well. However, how much is the overhead of serving a Go application behind an nginx server? Do we need some nginx features (vhosts, load balancing, cache, etc) or can you serve directly from Go? If you need nginx, what is the fastest connection mechanism? This are the kind of questions I'm intended to answer here. The purpose of this benchmark is not to tell that Go is faster or slower than nginx. That would be stupid.

So, these are the different settings we are going to compare:

  • Go HTTP standalone (as the control group)
  • Nginx proxy to Go HTTP
  • Nginx fastcgi to Go TCP FastCGI
  • Nginx fastcgi to Go Unix Socket FastCGI
View emacs24-cheat-sheet.md

EMACS 24 Cheat Sheet

Navigation

File

  • Move to the beginning of file: Meta-<
  • Move to the end of file: Meta->

Pages

View config.yml
monolog:
handlers:
main:
type: stream
handler: gelf
level: WARNING
gelf:
type: service
id: monolog.gelf_handler
View vaga_frontend_public.md

Caros,

a Zocprint é o mais novo investimento da Rocket Internet no Brasil. Prestamos serviços gráficos de qualidade pela Internet para microempresários e profissionais liberais a um preço baixo, e sem necessidade de confecção da arte pelo cliente.

Estamos com metas muito agressivas de crescimento e precisamos de talentos para suportá-las. Temos algumas vagas de tecnologia para desenvolvedores especializados em Front-End Web.

Pré-requisitos:

  • Ser ninja em JavaScript
  • Ser faixa-preta em CSS
View vaga_php_public.md

Caros,

a Zocprint é o mais novo investimento da Rocket Internet no Brasil. Prestamos serviços gráficos de qualidade pela Internet para microempresários e profissionais liberais a um preço baixo, e sem necessidade de confecção da arte pelo cliente.

Estamos com metas muito agressivas de crescimento e precisamos de talentos para suportá-las. Temos algumas vagas de tecnologia para desenvolvedores PHP.

Pré-requisitos:

  • Ser ninja de programação em PHP 5.x
  • Saber o que é e como usar classes, objetos, herança