#Make and GCC on Windows
- Install MinGW
- Follow the instructions
<html> | |
<head> | |
<title>Intersection Observer API</title> | |
</head> | |
<body> | |
<main> | |
<div class="observed"> | |
</div> | |
</main> | |
</body> |
namespace Ceane | |
module private rec Base | |
type foolproof<'a> = 'a; | |
type present<'a> = 'a; | |
type available<'a> = 'a; |
let REDS = 220 | |
let SHIFT = 8 | |
let heatmap = (i, of_) => Math.floor( | |
REDS * Math.sin(i / of_) | |
) + SHIFT + i | |
let backgroundColor = (item, items) => | |
`rgb(233, ${heatmap(item, items > 6 ? items : 6)}, 33` |
# locales | |
export LANG="en_US.UTF-8" | |
export LC_COLLATE="en_US.UTF-8" | |
export LC_CTYPE="en_US.UTF-8" | |
export LC_MESSAGES="en_US.UTF-8" | |
export LC_MONETARY="en_US.UTF-8" | |
export LC_NUMERIC="en_US.UTF-8" | |
export LC_TIME="en_US.UTF-8" | |
export LC_ALL="en_US.UTF-8" |
/** | |
* Sort an array by another array | |
* i.e. (blue, red, yellow, orange) -> (red, orange, yellow blue) | |
* | |
* @param {Array} a - Array to be sorted | |
* @param {Array} b - Array of order | |
*/ | |
function asort(a, b) { | |
let z = [...a]; |
/** | |
* Read up on the API here https://developer.mozilla.org/en-US/docs/Web/API/CSS/supports | |
*/ | |
if (!window.CSS) { | |
window.CSS = {}; | |
} | |
if(!RegExp.escape) { | |
RegExp.escape = s => String(s).replace(/[\\^$*+?.()|[\]{}]/g, '\\$&'); |
/* @flow */ | |
/** | |
* Parent element with perspective attribute will not look great | |
*/ | |
import React, { Component } from "react"; | |
const cx = (...c) => c.filter(n => !!n).join(" "); | |
const styles = { | |
root: "apple-tv-parllax-root", |
// Remove default params and destructuring and add "use strict" to test in Chrome 46 | |
const toFloat = (lhs) => parseFloat(lhs.replace(/[^-\d.]+/, "")); | |
export default class ExpressionParser { | |
constructor(str, fn = toFloat, _depth = 0) { | |
Object.assign(this, { _depth, fn, str }); | |
} | |
*[Symbol.iterator]() { |
/** | |
* Insert an item (d) at a certain index (b) in a | |
* recurring number (a) of items inside of an array (c) | |
* | |
* "For every 20 items in an array, | |
* insert this at the 12th index in that section" | |
* | |
* var myArray = Array.from({length: 80}, (v, k) => k); | |
* insertItemEvery(20, 12, myArray, "Hello index"); | |
* |
#Make and GCC on Windows