Skip to content

Instantly share code, notes, and snippets.

@shello
shello / .htaccess
Last active December 10, 2015 15:08
Portugal@Folding FahSig generator. Created by @joaomoreno, modified by @shello.
# Expires (cache) para sigs, shello@2010/09/13
ExpiresActive On
ExpiresByType image/png "now plus 12 hours"
# Rewriting para sigs dinamicas
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)\.(?:php|png)$ _signature.php?user=$1
@shello
shello / README.md
Created November 26, 2012 03:21
Vertically split tile with centered vertical alignment

See a demo on jsFiddle.

Check the inline comments for details.

Este é um apontamento por Carlos Duarte sobre aspectos práticos da Língua
Portuguesa, originalmente alojado em
<http://pagpessoais.iol.pt/~mz17929a/escrever-bem.txt>.
Recuperado da cópia de 3 de Março de 2009 na Wayback Machine do Internet
Archive<web.archive.org>.
@shello
shello / linux.die.net.css
Created July 13, 2012 01:36
linux.die.net manpages style based on solarized
@-moz-document url-prefix("http://linux.die.net/man/") {
/*
linux.die.net manpages, solarized dark style
*/
body { background: #002b36; color: #839496; }
h1 { border-bottom-color: #586e75; }
h2 { font-size: 1.4em; margin-bottom: 0.2em; }
@shello
shello / chrome.css
Created May 18, 2012 15:13 — forked from meqif/chrome.css
Travis-CI maximized main column
body#home { background: none; }
div#left { display: none; width: 0px; }
div#main { padding-left: 100px !important; }
#main .tabs { padding-left: 12px; margin-top: 20px; }
@shello
shello / gist:2495224
Created April 26, 2012 02:15
Functions for wrapping text (80 columns default); and a pbpaste/pbcopy shortcut function.
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
}
@shello
shello / publicip.sh
Created April 7, 2012 12:47
Logs your public IP address and respective hostname into a file
#!/usr/bin/env bash
# Public IP logger r2 (2012/04/10)
# Filipe Rodrigues <[email protected]>
# 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`
@shello
shello / gist:1670681
Created January 24, 2012 15:26
Write to a 'files.shasum' file the SHA Checksum of the regular files under the current directory (recursively), sorted alphabetically within each directory, while avoiding the output file.
OUTFILE='files.shasum' find -s . -type f -not -samefile $OUTFILE -exec shasum {} \; > $OUTFILE
@shello
shello / .htaccess
Created January 23, 2012 01:39
Rewrites for redirecting to your online bookmarking service of choice (change your username)
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]
@shello
shello / gist:1397691
Created November 27, 2011 15:24
virtualenvwrapper loader.
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
}