Skip to content

Instantly share code, notes, and snippets.

@rnmp
rnmp / mezzoblue-nav.html
Created March 10, 2012 16:06
Whatever Works
<nav id="nav">
<ul>
<li><a href="#">
....main site nav list....
</a></li>
</ul>
</nav>
$(document).bind('keydown', 'h', function() {
$hex.toggle(function() {
$(this).hide();
}, function() {
$(this).show();
});
});
$.fn.popup_handler = function(selector_to_show) {
var self = this;
var target = $(selector_to_show);
target.hide();
var target_shown = false;
var self_class = 'target-shown';
var target_show = function() {
target.show();
target_shown = true;
$(self).addClass(self_class);
@rnmp
rnmp / ie-fallback.haml
Created August 2, 2011 01:12
Haml fallback for IE.
/[if IE]
:javascript
document.body.className += ' ie';
/[if IE 6]
:javascript
document.body.className += ' ie6';
/[if IE 7]
:javascript
document.body.className += ' ie7';
/[if IE 8]
function ip {
port=$1
if [[ port -eq '' ]]; then
echo \"http://$IP/\" copied to clipboard.
echo http://$IP/ | pbcopy
else
echo \"http://$IP:$port/\" copied to clipboard.
echo http://$IP:$port/ | pbcopy
fi
}
@rnmp
rnmp / gist:1115618
Created July 30, 2011 15:08
Sublime Text build system for SASS.
{
"cmd": ["sass", "$file_name", "$file_base_name.css"],
"working_dir": "$file_path",
"selector": "source.sass"
}
@for $n from 1 through 7
#plantilla-#{$n}
:left 7em*$n
:-webkit-transform rotate(10deg*$n/(1.61803399*$n*$n))
.cleared:before, .cleared:after {
content: '';
display: table; }
.cleared:after {
clear: both; }
.cleared {
zoom: 1; }
@rnmp
rnmp / README.md
Created July 4, 2011 17:52
Divit

Divit

A tiny grid-system designed to fit on almost any width of your container by providing percentage-based proportions.

@rnmp
rnmp / gist:1002209
Created June 1, 2011 12:37
Zoom in CSS3 animation
@-webkit-keyframes roll-action {
0% {
-webkit-transform: scale(2);
opacity: 0; }
100% {
-webkit-transform: scale(1);
opacity: 1; } }
span.roll-result {
-webkit-animation: roll-action 0.25s; }