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 / 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 / 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 / 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 / quadras-bsb.md
Last active July 1, 2016 17:13
Layout dos blocos das quadras de brasília
@ninrod
ninrod / vim-centos-build-from-source.sh
Last active September 1, 2019 22:52 — forked from juxtin/vim74centos
Build Vim from source on Centos
#!/bin/bash
yum groupinstall 'Development tools' -y
yum install ncurses ncurses-devel -y
git clone --depth 1 https://github.com/vim/vim.git
cd vim
./configure --prefix=/usr --with-features=huge --enable-pythoninterp --enable-multibyte
make
sudo make install
@ninrod
ninrod / solarized-colors.md
Created April 12, 2016 19:07
Solarized Dark values on different color palettes

Solarized Dark values on different color palettes

SOLARIZED HEX 16/8 TERMCOL XTERM HEX L*A*B RGB HSB GNU screen
base03 #002b36 8/4 brblack 234 #1c1c1c 15,-12,-12 0,43,54 193,100,21 K
base02 #073642 0/4 black 235 #262626 20,-12,-12 7,54,66 192,90,26 k
base01 #586e75 10/7 brgreen 240 #585858 45,-07,-07 88,110,117 194,25,46 G
base00 #657b83 11/7 bryellow 241 #626262 50,-07,-07 101,123,131 195,23,51 Y
base0 #839496 12/6 brblue 244 #808080 60,-06,-03 131,148,150 186,13,59 B
base1 #93a1a1 14/4 brcyan 245 #8a8a8a `65,-05
@ninrod
ninrod / terminal-control.sh
Created April 8, 2016 21:21 — forked from bcap/terminal-control.sh
Useful terminal control characters
# Terminal output control (http://www.termsys.demon.co.uk/vtansi.htm)
TC='\e['
CLR_LINE_START="${TC}1K"
CLR_LINE_END="${TC}K"
CLR_LINE="${TC}2K"
# Hope no terminal is greater than 1k columns
RESET_LINE="${CLR_LINE}${TC}1000D"
@ninrod
ninrod / grok_vi.mdown
Created February 23, 2016 01:54 — forked from nifl/grok_vi.mdown
Your problem with Vim is that you don't grok vi.

Answer by Jim Dennis on Stack Overflow question http://stackoverflow.com/questions/1218390/what-is-your-most-productive-shortcut-with-vim/1220118#1220118

Your problem with Vim is that you don't grok vi.

You mention cutting with yy and complain that you almost never want to cut whole lines. In fact programmers, editing source code, very often want to work on whole lines, ranges of lines and blocks of code. However, yy is only one of many way to yank text into the anonymous copy buffer (or "register" as it's called in vi).

The "Zen" of vi is that you're speaking a language. The initial y is a verb. The statement yy is a simple statement which is, essentially, an abbreviation for 0 y$:

0 go to the beginning of this line. y yank from here (up to where?)

@ninrod
ninrod / build-zsh.sh
Created February 11, 2016 13:00
Build last stable version of ZSH from sources on Ubuntu, or any other version with small changes
#!/bin/bash
# Build Zsh from sources on Ubuntu.
# From http://zsh.sourceforge.net/Arc/git.html and sources INSTALL file.
# Make script gives up on any error
set -e
# Some packages may be missing
sudo apt-get install -y git-core gcc make autoconf yodl libncursesw5-dev texinfo checkinstall
Operador oper = new Operador();
Transacao utx2 = null;
utx2 = GerenciadorTransacoes.getInstancia().getTransacao();
utx2.begin();
try {
oper = FachadaPessoal.getInstancia().buscarOperador(operadorNome);
utx2.rollback();
} catch (BCRepositorioException re) {
throw new BCObjetoInvalidoException(FachadaProcorf.RESOURCE_BUNDLE,