Skip to content

Instantly share code, notes, and snippets.

@LeeRJohnson
LeeRJohnson / endoExportGPX.bookmarklet.js
Last active May 3, 2016 17:22
Endomondo Bulk History Download Scripts
javascript:(function(){document.querySelectorAll(".history-item-content").forEach(function(a){a="https://www.endomondo.com/rest/v1"+a.getAttribute("href")+"/export?format=GPX";window.open(a);});})();
@mrsweaters
mrsweaters / abide-example-blog.html
Last active June 14, 2019 15:08
An example implementation of Foundation Abide.
<form data-abide>
<div class="name-field">
<label>Your name <small>required</small></label>
<input type="number" required pattern="[a-zA-Z]+">
<small class="error">Name is required and must be a string.</small>
</div>
<div class="email-field">
<label>Email <small>required</small></label>
<input type="text" required pattern="email">
<small class="error">An email address is required.</small>
@cballenar
cballenar / css-baseline-grid.css
Last active October 14, 2015 00:08
/* This gist was inspired by DigitPaint [ http://advent2012.digitpaint.nl/13/ ] */ This is a baseline grid created using some (perhaps all) of the new CSS background properties. it simulates a baseline grid based on ems which will allow you to size according to your site's font size. A clear disadvantage is that it is limited to be a background.…
/* ---------------------------------------------------
Production Versions ( Minified )
--------------------------------------------------- */
/* Background */
/**/ .baseline{font-size:1em;background:none;background-image:-webkit-linear-gradient(rgba(0,0,0,0.2) 1px,transparent 1px);background-image:-moz-linear-gradient(rgba(0,0,0,0.2) 1px,transparent 1px);background-image:linear-gradient(rgba(0,0,0,0.2) 1px,transparent 1px);background-size:100% 1.5em;background-origin:content-box;background-attachment:local}
/**/ .baseline *{background:none !important;outline:1px dashed rgba(100%,0%,0%,.5)}
/* Overlay + Hover switch */
/**/ body{position:relative}body:hover:before{width:100%;height:100%;display:block;content:"";position:absolute;z-index:9999;pointer-events:none;background-size:100% .75em;background-origin:content-box;background-attachment:local;background-image:-webkit-linear-gradient(rgba(0,255,255,.75) 1px,transparent 1px);background-image:-moz-linear-gradient(rgba(0,255,255,.75) 1px,transparent 1px);bac
@Victa
Victa / gist:1209370
Created September 11, 2011 09:13
Font sizing with REM and PX (LESS)
// ABOUT
A simple LESS (http://lesscss.org) snippet based on http://snook.ca/archives/html_and_css/font-size-with-rem
It doesn't do much but saves you typing things twice, allowing you to use rem as a unit for font-sizes
and giving a px fallback for IE
// MIXIN
.font-size(@font-size: 16){
@rem: (@font-size / 10);
font-size: @font-size * 1px;
font-size: ~"@{rem}rem";
$fullred: #ff0000;
body {
font-family: Helvetica, Verdana
}
p {
padding: 7px 10px;
}
#demo {
border: 1px solid $fullred;
}
/*
* WEBKIT SCROLLBARS
*
* Testing the waters with this code...
* Technique found on http://elliottkember.com
*/
::-webkit-scrollbar {
width: 6px;
height: 6px;
/* Animation that rotates the logo */
@-webkit-keyframes spin-logo
{
0% { -webkit-transform: scale(1); }
50% { -webkit-transform: scale(.98); }
100% { -webkit-transform: scale(1); }
}
.selector {
-webkit-animation-name: spin-logo;
@LeeRJohnson
LeeRJohnson / html5-doctype-en-utf-8.html
Created August 25, 2010 17:33
HTML5 Optimized Markup Document Starts
<!doctype html>
<html lang=en>
<meta charset=utf-8>
<title>Valid HTML5 Document - Language English - Encoding UTF-8</title>
/*
Form Base Notes
-- Drop-down <select> menus are unaffected.
*/
input,
button,
select,
textarea {
margin: 0;
/* @group Radius */
.border-radius (@r: 0){
-webkit-border-radius: @r;
-moz-border-radius: @r;
border-radius: @r;
}
.border-top-left-radius(@r: 0){
-webkit-border-top-left-radius:@r;
-moz-border-radius-topleft:@r;
border-top-left-radius:@r;