Skip to content

Instantly share code, notes, and snippets.

View livercake's full-sized avatar

Felipe Parada livercake

View GitHub Profile
@livercake
livercake / gist:2893323
Last active October 5, 2015 23:08
html quickstart markup
<!DOCTYPE html>
<html>
<head>
<title>Historias de Corolla</title>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="http://netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.min.css">
<style type="text/css"></style>
</head>
@livercake
livercake / gist:2893345
Created June 8, 2012 03:19
CSS reset minified
html,body,div,span,applet,object,iframe,a,abbr,acronym,address,big,cite,code,del,dfn,em,font,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,dl,dt,dd,ol,ul,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,textarea,label,legend,p,blockquote,table,caption,tbody,tfoot,thead,tr,th,td{margin:0;padding:0;border:0;outline:0;font-weight:inherit;font-style:inherit;font-size:100%;font-family:inherit;vertical-align:baseline;}body{line-height:1;color:black;background:white;}:focus{outline:0;}table{border-collapse:collapse;border-spacing:0;}caption,th,td{text-align:left;font-weight:normal;}fieldset,img{border:0;}address,caption,cite,code,dfn,em,strong,th,var{font-style:normal;font-weight:normal;}ol,ul{list-style:none;}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal;}blockquote:before,blockquote:after,q:before,q:after{content:"";}blockquote,q{quotes:"" "";}abbr,acronym{border:0;}
@livercake
livercake / gist:2893353
Created June 8, 2012 03:21
jquery document.ready
$(document).ready(function(){
});
@livercake
livercake / gist:2893368
Last active October 5, 2015 23:08
jquery (latest) from google cdn
<script src="https://http://code.jquery.com/jquery-latest.min.js"></script>
(function() {
})();
@livercake
livercake / gist:8237480
Last active January 2, 2016 02:29
html quickstart markup: jquery + bootstrap 3
<!DOCTYPE html>
<html>
<head>
<title>Jelly v3</title>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="css/bootstrap.min.css">
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">
<link rel="stylesheet" href="type/type.css">
<?php
$newLoop = new WP_Query();
$newLoop->query('showposts=3');
while ($newLoop->have_posts()) : $newLoop->the_post(); ?>
<!-- do stuff here in HTML -->
<?php endwhile; ?>
<?php wp_reset_postdata(); ?>
@livercake
livercake / gist:8893907
Created February 9, 2014 03:37
jquery hover
$( "#target" ).hover(
function() {
$( this ).addClass( "hover" );
}, function() {
$( this ).removeClass( "hover" );
}
);
<!--
oooooooooo. oooo
`888' `Y8b `888
888 888 .ooooo. .ooooo. oooo ooo .oooo. 888 .oo.
888oooo888' d88' `88b d88' `88b `88. .8' `P )88b 888P"Y88b
888 `88b 888 888 888 888 `88..8' .oP"888 888 888
888 .88P 888 888 888 888 `888' d8( 888 888 888
o888bood8P' `Y8bod8P' `Y8bod8P' .8' `Y888""8o o888o o888o
.o..P'
@livercake
livercake / gist:428009fc59420ae88ef0
Created August 6, 2014 15:48
Video embeds: Aspect ratio fluid resizer
$(function() {
$allVideos = $(".video iframe, .video object, .video embed");
$fluidEl = $("div.video");
$allVideos.each(function() {
$(this).attr('data-aspectRatio', this.height / this.width)
.removeAttr('height')
.removeAttr('width');
});