Skip to content

Instantly share code, notes, and snippets.

View ninrod's full-sized avatar
🤓
git commiting since 2014

Filipe Silva ninrod

🤓
git commiting since 2014
View GitHub Profile
@ninrod
ninrod / quadras-bsb.md
Last active July 1, 2016 17:13
Layout dos blocos das quadras de brasília
@ninrod
ninrod / busca-ap.md
Last active April 21, 2016 02:17
busca de aptos

Busca

sqs-210

sqs-211

  • 1471088 - 6 andar, 120m2, perguntar se é vazado.
  • 457094 - 5 andar, 135m2.
@ninrod
ninrod / ctrr.md
Created April 29, 2016 08:26 — forked from esmooov/ctrr.md
Carats and Tildes, Resets and Reverts

Until last night I lived in fear of tildes, carats, resets and reverts in Git. I cargo culted, I destroyed, I laid waste the tidy indicies, branches and trees Git so diligently tried to maintain. Then Zach Holman gave a talk at Paperless Post. It was about Git secrets. He didn't directly cover these topics but he gave an example that made me realize it was time to learn.

A better undo

Generally, when I push out bad code, I panic, hit git reset --hard HEAD^, push and clean up the pieces later. I don't even really know what most of that means. Notational Velocity seems to be fond of it ... in that I just keep copying it from Notational Velocity and pasting it. Turns out, this is dumb. I've irreversibly lost the faulty changes I made. I'll probably even make the same mistakes again. It's like torching your house to get rid of some mice.

Enter Holman. He suggests a better default undo. git reset --soft HEAD^. Says it stag

@ninrod
ninrod / kerberos-conf.md
Last active May 16, 2016 20:46
Config do kerberos client

Hacks usar o kerberos no docker.

Primeiro, é preciso ter a parte cliente Kerberos instalada no container:

yum install krb5-workstation

Depois, você precisar fazer login:

kinit seu.login@SUAINTRANET.COM
@ninrod
ninrod / man-docker.sh
Created June 2, 2016 01:43
generate docker man pages from source
#! /bin/sh
# Step 1: checkout docker sources, but make sure you do this
# somewhere in /Users directory because boot2docker can only
# share this path with docker containers
git clone https://github.com/docker/docker.git
# Step 2: build docker image
cd docker/man && docker build -t docker/md2man .
@ninrod
ninrod / TrueColour.md
Created June 15, 2016 10:24 — forked from XVilka/TrueColour.md
True Colour (16 million colours) support in various terminal applications and terminals

Colours in terminal

It's a common confusion about terminal colours... Actually we have this:

  • plain ascii
  • ansi escape codes (16 colour codes with bold/italic and background)
  • 256 colour palette (216 colours + 16 ansi + 24 gray) (colors are 24bit)
  • 24bit true colour ("888" colours (aka 16 milion))
printf "\x1b[${bg};2;${red};${green};${blue}m\n"
@ninrod
ninrod / Monaco for Powerline.md
Created June 15, 2016 17:57 — forked from ymjing/Monaco for Powerline.md
Powerline-patched Monaco for Windows and OSX

Powerline-patched Monaco for Windows and OSX

This font is manually patched with Fontforge. It includes the glyphs from DejaVu Sans Mono for Powerline.

I recommend DirectWrite-patched VIM builds. I'm using KaoriYa's build (http://www.kaoriya.net/software/vim/)

Usage

Add the following lines to your .vimrc/_vimrc:

@ninrod
ninrod / introrx.md
Created July 4, 2016 02:33 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
@ninrod
ninrod / bagagem-mao-aeroporto-dimensoes.md
Created July 5, 2016 01:07
dimensoes-bagagem-de-mao-aeroporto

Dimensões da Bagagem de mão

A bagagem de mão ou de cabine é considerada como bagagem não registrada, sob a inteira responsabilidade do passageiro que a transporta, sendo que, a soma das dimensões (altura, largura e comprimento) não pode ultrapassar 115 cm, incluindo rodas, alças, bolsos externos, etc. As medidas máximas para cada dimensão são de 23 x 40 x 55 cm. Seu peso não deve exceder 5 kg. (Portaria 676/GC-5/ 13/11/2000), (IATA PassengerServices – Recomendação 1749).

@ninrod
ninrod / simple_args_parsing.sh
Created July 6, 2016 20:46 — forked from jehiah/simple_args_parsing.sh
a simple way to parse shell script arguments
#!/bin/sh
#
# a simple way to parse shell script arguments
#
# please edit and use to your hearts content
#
ENVIRONMENT="dev"