This file contains 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
/** | |
* A TextMatch (see https://testing-library.com/docs/queries/about#textmatch) | |
* which will match a text string broken across multiple elements. | |
* Useful for finding, e.g. "hello there" in <p>hello <b>there</b></p> | |
*/ | |
export const matchTextAcrossElements = | |
(text: string) => (content: string, element: Element | null) => { | |
const hasText = (element) => element.textContent === text; | |
const elementHasText = hasText(element); |
This file contains 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
{ | |
"name": "thefamous500", | |
"version": "1.0.0", | |
"main": "index.js", | |
"license": "MIT", | |
"dependencies": { | |
"express": "^4.15.2" | |
}, | |
"scripts": { | |
"start": "node server.js" |
This file contains 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
{ | |
"name": "streamingtest", | |
"version": "0.0.1", | |
"engines": { | |
"node": ">=0.6.0" | |
}, | |
"dependencies": { | |
"express": "2.5.x", | |
"coffee-script": "1.2.x" | |
}, |
This file contains 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
const api = require('panoptes-client/lib/api-client'); | |
const auth = require('panoptes-client/lib/auth'); | |
const credentials = { | |
login: process.env.PANOPTES_USER, | |
password: process.env.PANOPTES_PASSWORD, | |
} | |
auth.signIn(credentials) | |
.then(() => { | |
return api.type('classifications/incomplete').get(); | |
}) |
This file contains 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
<link rel="import" href="../google-map/google-map.html"> | |
<polymer-element name="my-element"> | |
<template> | |
<style> | |
:host { | |
position: absolute; | |
width: 100%; | |
height: 100%; |
This file contains 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
<!doctype html> | |
<html> | |
<head> | |
<link rel="stylesheet" href="test.css" type="text/css" /> | |
</head> | |
<body> | |
<ul class="menu"> | |
<li><a href="#">Home</a></li> | |
<li><a href="#">About</a></li> | |
<li><a href="#">Blog</a></li> |
This file contains 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
$(document.body).bind('touchstart', function(e){ | |
now = Date.now() | |
delta = now - (touch.last || now) | |
touch.el = $(parentIfText(e.touches[0].target)) | |
touchTimeout && clearTimeout(touchTimeout) | |
touch.touches = e.touches // Store touch list | |
touch.x1 = e.touches[0].pageX | |
touch.y1 = e.touches[0].pageY | |
if (delta > 0 && delta <= 250) touch.isDoubleTap = true | |
touch.last = now |