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
/* Run this in the JavaScript Console in your Browser on a GitHub Pull Request to mark all the files as Viewed */ | |
while (true) { | |
document.querySelector("input[type=checkbox]:not([checked]).js-reviewed-checkbox").click(); | |
await new Promise(r => setTimeout(r, 2000)); | |
} |
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
#!/bin/zsh | |
# For each package name | |
for PACKAGE in `npm pkg get devDependencies | jq 'keys[]' | tr -d '"'` | |
do | |
echo "Found ${PACKAGE}" && | |
# Get the current installed version | |
VERSION=`npm ls ${PACKAGE} --depth 0 --json | jq --arg package ${PACKAGE} '.dependencies.[$package].version' | tr -d '"'` && | |
echo "Current version ${VERSION}" && |
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
#!/bin/zsh | |
# For each package name | |
for PACKAGE in `npm pkg get dependencies | jq 'keys[]' | tr -d '"'` | |
do | |
echo "Found ${PACKAGE}" && | |
# Get the current installed version | |
VERSION=`npm ls ${PACKAGE} --depth 0 --json | jq --arg package ${PACKAGE} '.dependencies.[$package].version' | tr -d '"'` && | |
echo "Current version ${VERSION}" && |
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
// When you just need to pass through the value yield from another generator function use: | |
yield* generatorFunction(); | |
// When you need to manipulate each yielded value | |
const generator = generatorFunction(); | |
let next = await generator.next(); | |
while (!next.done) { | |
let value = next.value; | |
// TODO apply any transformations to value here | |
yield value; |
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
#!/bin/bash | |
# Get flutter | |
git clone https://github.com/flutter/flutter.git | |
FLUTTER=flutter/bin/flutter | |
# Configure flutter | |
FLUTTER_CHANNEL=master | |
FLUTTER_VERSION=v1.17.0 | |
$FLUTTER channel $FLUTTER_CHANNEL |
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 usersApi = require("./users"); | |
module.exports = { | |
// /users | |
"post-users": usersApi.post, | |
"get-users": usersApi.get, | |
// /users/{userId} | |
"get-users-userId": usersApi.get, | |
"patch-users-userId": usersApi.patch, | |
"delete-users-userId": usersApi.delete, |
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
#!/bin/sh | |
FLUTTER_BRANCH=`grep channel: .metadata | sed 's/ channel: //g'` | |
FLUTTER_REVISION=`grep revision: .metadata | sed 's/ revision: //g'` | |
git clone https://github.com/flutter/flutter.git | |
cd flutter | |
git checkout $FLUTTER_BRANCH | |
git pull origin $FLUTTER_BRANCH | |
git checkout $FLUTTER_REVISION | |
cd .. |
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
<html> | |
<head> | |
<script> | |
customElements.define("star-wars-planets", class extends HTMLElement { | |
constructor() { | |
super(); | |
this.attachShadow({ mode: "open" }); | |
} | |
static get observedAttributes() { return ["loading", "planets"]; } |
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
// Created by Derrick Cohodas (dav-) | |
// Based on the Python example by StackExchange user wwnick from http://gis.stackexchange.com/a/415/41129 | |
// Requires the Mathjs library - http://mathjs.org/ | |
var math = require('mathjs') | |
/** | |
* Represents a coordinate with a distance | |
* @param {Number} lat Latitude |
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
// assertions/compareScreenshot.js | |
var resemble = require('resemble'), | |
fs = require('fs'); | |
exports.assertion = function(filename, expected) { | |
var screenshotPath = 'test/screenshots/', | |
baselinePath = screenshotPath + 'baseline/' + filename, | |
resultPath = screenshotPath + 'results/' + filename, | |
diffPath = screenshotPath + 'diffs/' + filename; |
NewerOlder