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
{ | |
"_coffee": "coffeescript", | |
"_js": "javascript", | |
"adp": "tcl", | |
"al": "perl", | |
"ant": "xml", | |
"aw": "php", | |
"axml": "xml", | |
"bash": "shell", | |
"bats": "shell", |
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
function fetchWeather(services, timeout) { | |
let bestData = null; | |
const controllers = services.map(() => new AbortController()); | |
const cancelFrom = index => controllers.slice(index).map(c => c.abort()); | |
const fetches = services.map((url, index) => | |
fetch(url, {signal: controller[index].signal}) | |
.then((res) => { | |
bestData = res; | |
cancelFrom(index+1); | |
return res; |
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
# See also: | |
# - https://github.com/actions/runner/issues/774 | |
# - https://help.github.com/en/actions/reference/events-that-trigger-workflows#push-event-push | |
# - https://help.github.com/en/actions/reference/events-that-trigger-workflows#pull-request-event-pull_request | |
# - https://help.github.com/en/actions/reference/context-and-expression-syntax-for-github-actions | |
name: "[skip ci]" on Actions | |
on: [push, pull_request] |
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
const GridCard = styled.div` | |
flex: 1; | |
display: grid; | |
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); | |
grid-gap: 15px 10px; | |
`; |
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
#! /usr/bin/env node | |
/** | |
* This file does not use typescript as it's run before you've necessarily run `yarn install` | |
* As such, we can only use built-in modules here. | |
*/ | |
function main() { | |
let [ | |
// Arguments from the githook: https://git-scm.com/docs/githooks#_post_checkout |
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
jest.mock('react-native/Libraries/BatchedBridge/NativeModules', () => ({ | |
AlertManager: { | |
alertWithArgs: jest.fn(), | |
}, | |
AsyncLocalStorage: { | |
multiGet: jest.fn((keys, callback) => | |
process.nextTick(() => callback(null, [])), | |
), | |
multiSet: jest.fn((entries, callback) => | |
process.nextTick(() => callback(null)), |
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
package main | |
import ( | |
"runtime" | |
"fmt" | |
"time" | |
) | |
func main() { | |
// Print our starting memory usage (should be around 0mb) |
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
// Author: Christian Schlensker for Bugsnag. | |
// @flow | |
import { omit } from 'lodash'; | |
import * as React from 'react'; | |
// Creates a React context to track track the tree of ClickBoundaries down the component hierarchy. | |
const NodeContext = React.createContext(); | |
type Props = { |
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
var mediaJSON = { "categories" : [ { "name" : "Movies", | |
"videos" : [ | |
{ "description" : "Big Buck Bunny tells the story of a giant rabbit with a heart bigger than himself. When one sunny day three rodents rudely harass him, something snaps... and the rabbit ain't no bunny anymore! In the typical cartoon tradition he prepares the nasty rodents a comical revenge.\n\nLicensed under the Creative Commons Attribution license\nhttp://www.bigbuckbunny.org", | |
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4" ], | |
"subtitle" : "By Blender Foundation", | |
"thumb" : "images/BigBuckBunny.jpg", | |
"title" : "Big Buck Bunny" | |
}, | |
{ "description" : "The first Blender Open Movie from 2006", | |
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4" ], |