This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc | |
. ~/.bashrc | |
mkdir ~/local | |
mkdir ~/node-latest-install | |
cd ~/node-latest-install | |
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1 | |
./configure --prefix=~/local | |
make install # ok, fine, this step probably takes more than 30 seconds... | |
curl https://npmjs.org/install.sh | sh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### PROMPT #################### | |
# function parse_git_dirty { | |
# [[ $(git status 2> /dev/null | tail -n1) != "nothing to commit (working directory clean)" ]] && echo "*" | |
# } | |
# | |
# function parse_git_branch { | |
# git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/[\1$(parse_git_dirty)]/" | |
# } | |
# |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function! CopyMatches(reg) | |
let hits = [] | |
%s//\=len(add(hits, submatch(0))) ? submatch(0) : ''/ge | |
let reg = empty(a:reg) ? '+' : a:reg | |
execute 'let @'.reg.' = join(hits, "\n") . "\n"' | |
endfunction | |
command! -register CopyMatches call CopyMatches(<q-reg>) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
VIM regex | |
Strip class attributes from HTML tags, including those spanning over multiple lines | |
Change `class` word for anything else you want to strip.. | |
:%s/<\s*\(\w*\)\s*class[^>]*>\([^<]\_.\{-}\)<\/.*>/<\1>\2<\/\1>/gc |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### PROMPT #################### | |
function parse_git_dirty { | |
[[ $(git status 2> /dev/null | tail -n1) != "nothing to commit (working directory clean)" ]] && echo "*" | |
} | |
function parse_git_branch { | |
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/[\1$(parse_git_dirty)]/" | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.moduletable_menu, .moduletable_menu ul { | |
padding: 0; | |
margin: 0; | |
list-style: none; | |
} | |
.moduletable_menu a { | |
display: block; | |
width: 10em; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Substitution facility script for VIM, useful in JOOMLA developing: | |
_by branquito de munze | |
# go into folder where you will be processing substitutions on files | |
cd vim-processing\com_somecomponent\ | |
# load files in which you want changes to occure, filtered by extension |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
command to find recursively files {can be modified for folders too, change -type f}, and renamed them by specfying regex pattern | |
find . -type f -maxdepth [depth] -name "[filepattern]" | while read FNAME; do mv "$FNAME" "${FNAME//search/replace}"; done | |
example: | |
find . -type f -maxdepth 1 -name "domain*.php" | while read FNAME; do mv "$FNAME" "${FNAME//domain/lead}"; done | |
before: after: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git://github.com/garbas/vim-snipmate.git | |
https://github.com/tomtom/tlib_vim.git | |
https://github.com/MarcWeber/vim-addon-mw-utils.git | |
https://github.com/honza/snipmate-snippets.git | |
git://github.com/tpope/vim-surround.git | |
git://github.com/ervandew/supertab.git | |
git://github.com/Lokaltog/vim-powerline.git | |
git://github.com/kien/ctrlp.vim.git | |
git://github.com/wgibbs/vim-irblack.git | |
git://github.com/tomtom/tcomment_vim.git |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://ge.tt/5IIibHY/v/0?c |