Skip to content

Instantly share code, notes, and snippets.

@hgfischer
hgfischer / xargs.md
Created January 11, 2018 08:06
xargs instead of for loops

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 | \

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.

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.

@hgfischer
hgfischer / ts-shara.txt
Created March 9, 2014 15:36
Esquema No-Break TS-Shara 1.2Kva
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%)
@hgfischer
hgfischer / shell_shortcuts.txt
Last active March 20, 2017 17:23
Shell Shortcuts (emacs mode)
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
@hgfischer
hgfischer / benchmark+go+nginx.md
Last active April 11, 2024 22:09
Benchmarking Nginx with Go

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
@hgfischer
hgfischer / emacs24-cheat-sheet.md
Last active December 13, 2015 19:38
Emacs 24 Cheat Sheet

EMACS 24 Cheat Sheet

Navigation

File

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

Pages

@hgfischer
hgfischer / config.yml
Created May 10, 2012 18:13 — forked from Spea/deps
Gelf handler implementation for Symfony 2.0
monolog:
handlers:
main:
type: stream
handler: gelf
level: WARNING
gelf:
type: service
id: monolog.gelf_handler
@hgfischer
hgfischer / vaga_frontend_public.md
Created March 15, 2012 21:26
Vaga Desenvolvedor Front-End

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
@hgfischer
hgfischer / vaga_php_public.md
Created March 15, 2012 21:26
Vaga para Desenvolvedor PHP

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