Skip to content

Instantly share code, notes, and snippets.

View fzero's full-sized avatar

Fabio Neves fzero

View GitHub Profile
@fzero
fzero / gist:1111866
Created July 28, 2011 16:22
Vim: Remove trailing blanks from all lines in a file
" Removes trailing spaces
function TrimWhiteSpace()
%s/\s*$//
''
:endfunction
" Associates it with F2 key
map! <F2> :call TrimWhiteSpace()<CR>
@fzero
fzero / wp-upgrade.sh
Created July 15, 2011 21:07
Update several self-hosted Wordpress blogs at once on Dreamhost
#!/bin/bash
cd $HOME
# Add here every domain/folder where you have Wordpress installed.
# Dreamhost normally puts all domains on $HOME, so this is what I do.
DOMAINS="mydomain1.com mydomain2.com mydomain3.com"
# Add here any dirs, file patterns etc. that you don't want to backup before upgrading.
# These are MY settings; tweak according to your needs.
@fzero
fzero / masstagger.sh
Created July 15, 2011 04:22
A quick automatic tagger for MP3 (uses eyeD3 - http://eyed3.nicfit.net)
#!/bin/bash
# This expects files ordered like:
# Artist/Album/01 Track Title.mp3
#
# You should provide the dir containing the Artist dirs at the command line.
START="$1"
if [ "$START" == "" ]; then