I hereby claim:
- I am mdarens on github.
- I am mdarens (https://keybase.io/mdarens) on keybase.
- I have a public key whose fingerprint is 1579 EADF BA25 F3FE 7343 9DB5 F148 D874 46FA C492
To claim this, I am signing this object:
import { differenceInCalendarDays } from "date-fns"; | |
const buildDate = new Date(); | |
// starting at 1 minute, add a minute to the revalidation | |
// for each additional day in the past/future. | |
// for example, a page associated with a date today, tomorrow or yesterday would refetch when stale by a minute. | |
// one a week in the past or future would only revalidate every 7 minutes, | |
// and one a month out would revalidate on the half hour. | |
// the assumption here is that events, posts and other entities with |
declare module "urlcat" { | |
type PathTemplateTokens< | |
Rte | |
> = Rte extends `${string}/:${infer P}/${infer Rest}` | |
? P | PathTemplateTokens<`/${Rest}`> | |
: Rte extends `${string}/:${infer P}` | |
? P | |
: never; | |
function urlcat< |
<!DOCTYPE html> | |
<html> | |
<head> | |
<link href="http://netdna.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css" rel="stylesheet" type="text/css" /> | |
<meta charset="utf-8"> | |
<title>JS Bin</title> | |
<style id="jsbin-css"> | |
svg { | |
width: 3em; | |
height: 1em; |
var React = require("react"); | |
var cx = require("classnames"); | |
var _ = require("lodash"); | |
require("./index.less"); | |
var HighlightOnChange = React.createClass({ | |
propTypes: { | |
subscribeTo: React.PropTypes.any.isRequired, | |
component: React.PropTypes.any, |
@import "PATH/TO/bootstrap/less/variables.less"; | |
.tooltip { | |
.tooltip-inner { | |
.classisize-inner(~"danger"); | |
.classisize-inner(~"success"); | |
.classisize-inner(~"warning"); | |
.classisize-inner(~"info"); | |
} | |
.tooltip-arrow { |
// adds fill attribute to all g, polygon, path and rect children of an SVG string, | |
// assuming you have stripped the fill attributes already | |
.colorize-svg(@svg: "", @cl-fill: currentColor) { | |
@colorized-svg: replace(@svg, '(<g\s|<polygon\s|<path\s|<rect\s)', '$1fill="@{cl-fill}" ', 'g'); | |
} | |
// You don't have to base64 SVGs unless you've embedded some binary images in them | |
// See https://css-tricks.com/probably-dont-base64-svg/ | |
.make-svg-data-url(@svg: "") { |
I hereby claim:
To claim this, I am signing this object:
var selectors = []; | |
for (var i = 77; i <= 96; i+=1) { | |
selectors.push('#NUTRIENT_'+i); | |
} | |
var proteinAmounts = []; | |
$.each(selectors, function(idx, sel) { | |
proteinAmounts.push($(sel).text()); | |
}); | |
proteinAmounts; |
<!DOCTYPE html> | |
<html> | |
<head> | |
<script src="http://cdnjs.cloudflare.com/ajax/libs/knockout/2.2.1/knockout-min.js"></script> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.0.2/jquery.min.js"></script> | |
<meta charset=utf-8 /> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<h1>Wrappin Queries</h1> |