Skip to content

Instantly share code, notes, and snippets.

.wrapper:hover > div > label{
background-position:left bottom;
}
label{
background:url('http://img833.imageshack.us/img833/5959/stard.png') no-repeat left bottom;
float:right;
line-height:20px;
padding-left:20px;
height:15px;
}
@gittmaan
gittmaan / gist:4035409
Created November 7, 2012 23:41
Minitest rspec or spec matchers and shared behaviours
# 100.should be_multiple_of(10)
#rspec
Rspec::Matchers.define :be_multiple_of do |multiple|
match do |number|
number % multiple == 0
end
failure_message_for_should do |number|
"Expected #{number} to be multiple of #{multiple}"
@gittmaan
gittmaan / rbenv-install-system-wide.sh
Created July 23, 2012 22:54 — forked from v1nc3ntlaw/rbenv-install-system-wide.sh
rbenv install ruby 1.9.3-p194 on Ubuntu
# Update, upgrade and install development tools:
apt-get update
apt-get -y upgrade
apt-get -y install build-essential git-core curl libssl-dev \
libreadline6 libreadline6-dev \
zlib1g zlib1g-dev \
libmysqlclient-dev \
libcurl4-openssl-dev \
libxslt-dev libxml2-dev
HTML_TAG_REPLACEMENTS = {
'br' => "\n",
}
HTML_QUOTE_REPLACEMENTS = {
'quot' => '"',
'amp' => '&',
}
def strip_html(str, tag = HTML_TAG_REPLACEMENTS, quot = HTML_QUOTE_REPLACEMENTS)
str.gsub %r{