Skip to content

Instantly share code, notes, and snippets.

💿

Rolando Murillo rnmp

💿
Block or report user

Report or block rnmp

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View common.js
$(document).bind('keydown', 'h', function() {
$hex.toggle(function() {
$(this).hide();
}, function() {
$(this).show();
});
});
View login.js
$.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 Aug 2, 2011
Haml fallback for IE.
View ie-fallback.haml
/[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]
View gist:1116782
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 Jul 30, 2011
Sublime Text build system for SASS.
View gist:1115618
{
"cmd": ["sass", "$file_name", "$file_base_name.css"],
"working_dir": "$file_path",
"selector": "source.sass"
}
View gist:1112610
@for $n from 1 through 7
#plantilla-#{$n}
:left 7em*$n
:-webkit-transform rotate(10deg*$n/(1.61803399*$n*$n))
View gist:1073600
.cleared:before, .cleared:after {
content: '';
display: table; }
.cleared:after {
clear: both; }
.cleared {
zoom: 1; }
View README.md

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 Jun 1, 2011
Zoom in CSS3 animation
View gist:1002209
@-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; }
@rnmp
rnmp / gist:1002206
Created Jun 1, 2011
Perform an action when one or more checkboxes are checked
View gist:1002206
var runWhenClicked = function(){
var checked = $('#fave-restaurants').find(":checked");
checked.length > 0 ? $('#find-table-favorite').text('Buscar en los seleccionados') : $('#find-table-favorite').text('Buscar mesas'); }
$(':checkbox').click(runWhenClicked);
You can’t perform that action at this time.