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 / gist:94d8498a26b82b0e18903a32f9aef194
Created July 15, 2016 16:46 — forked from mbadran/gist:130469
replace cd in bash to (silent) pushd
alias cd="pushd $@ > /dev/null"
@ninrod
ninrod / relative-visual-line-number.md
Last active July 14, 2016 15:21
relative visual line numbers for emacs

Relative visual line numbers for Emacs

  • Here I state the case for native support for relative visual line numbers

  • Screenshot:

vim vs emacs

@ninrod
ninrod / workflowy-to-org-mode.el
Created July 7, 2016 20:30
Convert from Workflowy export format to Org-Mode
(defun workflowy-to-org-mode ()
(interactive)
(let (count)
(while (not (eobp))
(setq count 0)
(while (looking-at " ")
(setq count (1+ count))
(forward-char 1))
(forward-char 1)
(delete-region (point-at-bol) (point))
@ninrod
ninrod / js-conceal.vim
Last active July 7, 2016 20:06 — forked from lukaszkorecki/js.vim
concealing in vim
" replace 'function' with λ
au BufNewFile,BufRead *.js syntax keyword javasScriptFunction function conceal cchar=λ
au BufNewFile,BufRead *.js hi! link javasScriptFunction Conceal
au BufNewFile,BufRead *.js setlocal conceallevel=2
" add abbreviations for JS
" f_
" expands to
" function() {
" <cursor>
"
@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"
@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 / introrx.md
Created July 4, 2016 02:33 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
@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 / 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 / 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 .