Skip to content

Instantly share code, notes, and snippets.

@LeeRJohnson
LeeRJohnson / workout-type-default.js
Created May 3, 2016 20:39
Strava Bulk Edit Scripts
document.querySelectorAll(".quick-edit").forEach(function(e){e.click();});
document.querySelectorAll(".edit-col select.workout-type").forEach(function(e){e.selectedIndex=0;});
document.querySelectorAll(".edit-col button[type=submit]").forEach(function(e){e.click();});
@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);});})();
<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>
@LeeRJohnson
LeeRJohnson / foundation-grid-sized-flex-video.html
Last active December 12, 2015 08:09
Methods for controlling the scaling of video in a theme using Foundation.
<div class="row"><!-- not really need - row should exist higher in the doc -->
<div class="six columns centered"><!-- six is the width (half) but could be one through tweleve - centered centers it -->
<div class="flex-video widescreen"><!-- widescreen is for the 560 315 ratio -->
<iframe width="560" height="315" src="http://www.youtube.com/embed/N966cATFWjI" frameborder="0" allowfullscreen=""></iframe>
</div>
</div>
</div>
body {
font-family: Helvetica, Verdana
}
p {
padding: 7px 10px;
}
#demo {
border: 1px solid #999;
}
@LeeRJohnson
LeeRJohnson / blueprint-grid-em.css
Created December 2, 2011 19:21
My CSS Grid Variations Archive
/* --------------------------------------------------------------
grid.css
* Sets up an easy-to-use grid of 24 columns.
By default, the grid is 950px wide, with 24 columns
spanning 30px, and a 10px margin between columns.
-------------------------------------------------------------- */
@LeeRJohnson
LeeRJohnson / fiddle.css
Created December 1, 2011 00:45 — forked from zalun/fiddle.css
jsFiddle Gist Template
body {
font-family: Helvetica, Verdana
}
p {
padding: 7px 10px;
}
#demo {
border: 1px solid #999;
}
@LeeRJohnson
LeeRJohnson / addScripts.js
Created November 23, 2011 17:40 — forked from zvoase/JSShell.js
jsshell nots and dev
function addHeadScript (url, type, title, id) {
if (!url) return;
head = document.getElementsByTagName('head')[0];
script = document.createElement('script');
script.src = url;
script.type = (type) ? type : 'text/javascript';
script.title = title;
script.id = (id) ? id : title.replace(\\s+\, '-');
head.appendChild(script);
return script;
sudo apt-get install mricron
sudo npm install jade
sudo npm install less
sudo npm install jade
sudo npm install express
express /tmp/xapp1 && cd /tmp/xapp1
sudo npm install -g express
express /tmp/xapp1 && cd /tmp/xapp1
sudo npm install -d
node app.js
@LeeRJohnson
LeeRJohnson / license.inc
Created December 16, 2010 00:34
HTML5 Presentation Bits
<!--
Copyright 2010 Google Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software