This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu:artful | |
RUN apt-get update \ | |
&& apt-get -y install build-essential llvm-4.0 clang libedit-dev libgmp-dev bison flex libz-dev ghc curl \ | |
&& curl -sSL https://get.haskellstack.org/ | sh \ | |
&& stack --resolver lts-8.13 --install-ghc install BNFC alex happy \ | |
&& rm -rf /var/lib/apt/lists/* | |
RUN apt-get update \ | |
&& apt-get -y install cmake libgtest-dev \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
! zeit teaser comment count | |
zeit.de##.js-update-commentcount | |
! zeit main teaser | |
zeit.de##.teaser-classic__metadata *:nth-last-child(2):after | |
zeit.de##.teaser-dossier__metadata *:nth-last-child(2):after | |
zeit.de##.teaser-fullwidth__metadata *:nth-last-child(2):after | |
zeit.de##.teaser-large__metadata *:nth-last-child(2):after | |
zeit.de##.teaser-small-minor__metadata *:nth-last-child(2):after | |
zeit.de##.teaser-small__metadata *:nth-last-child(2):after |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import PropTypes from 'prop-types'; | |
/** | |
* React component that keeps you up to date about navigator.onLine | |
* | |
* @example | |
* <Online> | |
* {isOnline => (isOnline ? <span>online!</span> : <span>offline!</span>)} | |
* </Online> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# An ISO 8601 encoded date string. | |
scalar Date | |
# An ISO 8601 encoded UTC date string. | |
scalar DateTime | |
# An RFC 3986, RFC 3987, and RFC 6570 (level 4) compliant URI string. | |
scalar URI | |
# An object with an ID. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import get from "lodash.get"; | |
import isEqual from "lodash.isequal"; | |
/** | |
* Subscribe to changes of part of a redux tree | |
* | |
* @example | |
* watch(Store, "dataset.currentId", id => { | |
* console.log(id); | |
* }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Turn an array into chunks | |
* | |
* @param {Array} arr - Array that should be chunked | |
* @param {number} size - Chunk size | |
* @returns {Array} Array of Arrays where each array has at max `size` elements | |
*/ | |
const chunkify = (arr, size) => | |
arr.reduce( | |
(acc, cur) => |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use Ds\Map; | |
use Ds\Vector; | |
/** | |
* JSON de-/encoder that throws on error and decodes into PHP Data Structures | |
*/ | |
final class JSON | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import get from 'lodash.get'; | |
/** | |
* Subscribe partially to redux store changes | |
* | |
* @example | |
* subscribe(store, "backup.url", (state, prevState) => console.log("change!", state, prevState)); | |
* | |
* @param {Redux.Store} store - Redux store | |
* @param {String} path - Path within the store object that should be watched for change. See https://lodash.com/docs/4.17.15#get |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
export default { | |
props: { | |
foobar: { | |
type: String, | |
required: true | |
} | |
}, | |
data() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Parse a duration string | |
* | |
* A duration string is a sequence of decimal numbers, each with optional | |
* fraction and a unit suffix such as "300ms", "1.5h", "2h45m12s" etc. | |
* | |
* Valid units are: "h", "m", "s", "ms" | |
* | |
* A decimal without unit is considered to be a second, e.g. "1m13" === "1m13s". | |
* |