This file contains 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 ziptotgz(){ | |
TMPDIR=`mktemp -dt ziptotgz` || exit 1 | |
unzip -qd $TMPDIR $1 | |
pushd $TMPDIR > /dev/null | |
tar -czf ${1/%.zip/.tar.gz} ./* | |
popd > /dev/null | |
rm -rf $TMPDIR |
This file contains 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
javascript:(function(){window.open("https://www.mbnet.pt/mbnetAut.html","MBNet","toolbar=no,menubar=no,resizable=yes,width=299,height=299");})(); |
This file contains 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
filipe@macfilipe ~% sudo brew install -v weechat | |
==> Downloading http://www.weechat.org/files/src/weechat-0.3.5.tar.bz2 | |
File already downloaded and cached to /Library/Caches/Homebrew | |
/usr/bin/tar xf /Library/Caches/Homebrew/weechat-0.3.5.tar.bz2 | |
==> cmake -DPREFIX=/usr/local/Cellar/weechat/0.3.5 -DENABLE_RUBY=OFF -DENABLE_PERL=OFF -DCMAKE_INSTALL_PREFIX='/usr/local/Cellar/weechat/0.3.5' -DCMAKE_BUILD_TYPE=None -Wno-dev . | |
cmake -DPREFIX=/usr/local/Cellar/weechat/0.3.5 -DENABLE_RUBY=OFF -DENABLE_PERL=OFF -DCMAKE_INSTALL_PREFIX='/usr/local/Cellar/weechat/0.3.5' -DCMAKE_BUILD_TYPE=None -Wno-dev . | |
-- The C compiler identification is GNU | |
-- Checking whether C compiler has -isysroot | |
-- Checking whether C compiler has -isysroot - yes | |
-- Checking whether C compiler supports OSX deployment target flag |
This file contains 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
#!/usr/bin/env python | |
import sys | |
UNIT_FACTORS = {'B': 0, 'K': 1, 'M': 2, 'G': 3, 'T': 4, 'P': 5} | |
def bytes_multiplier(unit): | |
if UNIT_FACTORS.has_key(unit): | |
return 1024 ** UNIT_FACTORS[unit] | |
else: |
This file contains 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
VIRTUALENVWRAPPER_PATH="/usr/local/Cellar/python/2.7.1/bin/virtualenvwrapper.sh" | |
function virtualenvwrapper () { | |
if [ ! -n "${VIRTUALENVWRAPPER_SET}" ]; then | |
source ${VIRTUALENVWRAPPER_PATH} | |
VIRTUALENVWRAPPER_SET=true | |
echo "virtualenvwrapper loaded." | |
fi | |
} |
This file contains 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
RewriteEngine On | |
# Shorturl for online bookmark tags: Pinboard | |
RewriteRule ^$ https://pinboard.in/u:shello/ [L,R=301] | |
RewriteRule ^(.*)$ https://pinboard.in/u:shello/t:$1/ [L,R=301] | |
# Shorturl for online bookmark tags: Delicious | |
# RewriteRule ^(.*)$ http://delicious.com/ptshello/$1 [R=301] |
This file contains 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
OUTFILE='files.shasum' find -s . -type f -not -samefile $OUTFILE -exec shasum {} \; > $OUTFILE |
This file contains 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
#!/usr/bin/env bash | |
# Public IP logger r2 (2012/04/10) | |
# Filipe Rodrigues <shello@shello.org> | |
# Logs your public IP address into a file | |
LC_TIME=C # Deactivate for the system time locale | |
LOGFILE="${HOME}/publicip/publicip.log" # Logfile | |
CURR_DATE=`date` |
This file contains 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 ncols() { fold -s -w ${1:-80}; } | |
function pbncols() { | |
command -v pbpaste >/dev/null 2>&1 && command -v pbcopy >/dev/null | |
if [[ $? != 0 ]]; then | |
echo >&2 "pbpaste and pbcopy are required. Aborting." | |
return 1 | |
fi | |
pbpaste | ncols $1 | pbcopy | |
} |
This file contains 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
body#home { background: none; } | |
div#left { display: none; width: 0px; } | |
div#main { padding-left: 100px !important; } | |
#main .tabs { padding-left: 12px; margin-top: 20px; } |
OlderNewer