Skip to content

Instantly share code, notes, and snippets.

View devdrops's full-sized avatar
🔥
Paz Entre Nós, Guerra Aos Senhores

Davi Marcondes Moreira devdrops

🔥
Paz Entre Nós, Guerra Aos Senhores
View GitHub Profile
@devdrops
devdrops / tmux.md
Created February 24, 2018 13:45 — forked from andreyvit/tmux.md
tmux cheatsheet

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

remap prefix to Control + a

@devdrops
devdrops / tmux-cheatsheet.markdown
Created February 24, 2018 13:42 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@devdrops
devdrops / netrw quick reference.md
Created February 7, 2018 03:02 — forked from t-mart/netrw quick reference.md
A quick reference for Vim's built-in netrw file selector.
Map Action
<F1> Causes Netrw to issue help
<cr> Netrw will enter the directory or read the file
<del> Netrw will attempt to remove the file/directory
- Makes Netrw go up one directory
a Toggles between normal display, hiding (suppress display of files matching g:netrw_list_hide) showing (display only files which match g:netrw_list_hide)
c Make browsing directory the current directory
C Setting the editing window
d Make a directory
@devdrops
devdrops / Dockerfile
Last active October 3, 2017 03:00
DiffCS: proposal for Docker environment
FROM php:7.1-cli
ARG VCS_REF
ARG BUILD_DATE
ARG RELEASE_VERSION
LABEL authors="Davi Marcondes Moreira <davi.marcondes.moreira@gmail.com>, Marcelo Santos <marcelsud@gmail.com>" \
org.label-schema.name="Docker/DiffCS" \
org.label-schema.vcs-ref=$VCS_REF \
org.label-schema.build-date=$BUILD_DATE \
@devdrops
devdrops / instructions.md
Last active July 5, 2017 20:00
VIM basic settings

VIM basic settings

How to install?

curl -o ~/.vimrc https://gist.githubusercontent.com/devdrops/c8a5ee0a52fbe59fe19668ee309302b3/raw/aa7583d6c802f07e0e03f94a999f7ac3bec968b5/vimrc

mkdir -p ~/.vim/syntax

curl -o ~/.vim/syntax/php.vim https://gist.githubusercontent.com/devdrops/c8a5ee0a52fbe59fe19668ee309302b3/raw/a5f6f5386b0e3d4d8b4fe6873052be6991b80186/php.vim
@devdrops
devdrops / instructions.md
Created June 13, 2017 21:09
Como executar validações do SDK

Como executar validações do SDK

  1. Vá na raiz do diretório de pagarme-php.

  2. Faça o checkout do branch a ser avaliado.

  3. Instale as dependências do Composer, conforme abaixo:

    docker-compose run composer install
    
@devdrops
devdrops / lista.md
Created May 31, 2017 02:17
IDÉIAS!

IDÉIAS

Lista de ideias para fazer! \o/

  • Gastos
    • Sistema para acompanhar a evolução dos meus gastos. Por uma interface eu registro o gasto (Telegram?), e num dashboard eu vejo os gastos em comparação. Pode ser hospedado no Heroku e usar o PostgreSQL para persistir os dados. Lá dentro pode ter uma interface web que exibe os gastos conforme as regras que eu quiser.
@devdrops
devdrops / instructions.md
Last active May 25, 2017 19:15
Go Travis Go!

Go Travis Go!

Kudos para @MarcoWorms por criar o script original - eu só fiz como bookmark e coloquei os ponto-e-vírgula :D

  1. Crie uma nova bookmark no Chrome;
  2. Em Bookmark Manager, edite o conteúdo da Bookmark colocando o trecho de código abaixo:
javascript:(function(){window.setInterval(() => document.querySelectorAll('.jobs-item.failed').forEach(build => {console.log('Restarting build', build.querySelector('.job-env').textContent.trim(), (new Date()).toString()); build.querySelector('.action-button--restart').click(); }), 5000); }());
@devdrops
devdrops / config.cson
Created March 31, 2017 22:30
Atom settings
"*":
core:
audioBeep: false
themes: [
"one-dark-ui"
"monokai"
]
editor:
scrollPastEnd: true
showIndentGuide: true
@devdrops
devdrops / tip.md
Last active March 13, 2017 19:37
Run PHP CodeSniffer for all changed/new files on Git, using Docker

Run PHP CodeSniffer for all changed/new files on Git, using Docker

  • The -a flag instructs phpcs to execute interactively, so then you can edit the files and re-check it again with no need to run the same phpcs command again. Awesome, eh?
  • The Git part:
    • git status --porcelain will show us all files and their state: ?? for a new one, M for modified;
    • We combine egrep and cut to give us exactly what we want, a perfect list.
    • We put this as a subcommand to pass the expected file list to phpcs.
  • Docker here is a mere tool. You can enjoy the same functionality with or without it 😉