Skip to content

Instantly share code, notes, and snippets.

View apux's full-sized avatar

Azarel Doroteo Pacheco apux

View GitHub Profile
@apux
apux / update_multiple_git_repositories.sh
Last active October 7, 2017 06:29
Update multiple git repositories
#!/bin/sh
dirs=`ls -1d */`
for d in $dirs
do
echo $d
echo '======================'
IFS=$'\n' lines=($(cd $d; git pull))
for l in $lines
do
echo $l
@apux
apux / vim_regex.md
Last active August 4, 2017 15:35
Regex for vim

hash rocket to colon

:%s/:\(\w\+\)\( *\)=>\( *\)/\1: /g

clean trailing spaces

:%s/\s\+$//
@apux
apux / cd_functions.plugin.zsh
Created September 7, 2012 00:39
zsh functions
cdl() { cd ~/Projects/Ruby/RoR/lbs/$1; }
_cdl() { _files -W ~/Projects/Ruby/RoR/lbs -/; }
compdef _cdl cdl
cdo() { cd ~/Projects/Ruby/RoR/own/$1; }
_cdo() { _files -W ~/Projects/Ruby/RoR/own -/; }
compdef _cdo cdo
@apux
apux / vim_1_basic_configuration.md
Last active March 3, 2017 16:16
List of github repositories for vim

Configuring Vim to work with Rails

Basic configuration

Vim is an extremely powerful text editor, especially for developers. Here, I'll share some of the tips I use working with it on Rails projects. This is not pretended to be a guide about how to use vim, but just to show my most common configuration that I find useful.

No Compatible

Vim is, by default, compatible with vi (the text editor which vim is based in). This is good if you work a lot with both applications because you'll want to have the same experience as user, but the cost of this compatibility is you lose all new features vim supports and vi doesn't. So, since I only use vim, I disable the vi compatibility.