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
// We're creating a function to handle retrieving | |
// the image from the NASA API | |
// Function is asynchronous because talking to the API | |
// isn't instantaneous (your bartender can't instantly | |
// give you your drink when you ask him for it) | |
handlePic = async () => { | |
// Create a response variable that retrieves the data | |
const response = await nasa.get() | |
// Change the state of picture to be the hdurl |
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
// Use the componentDidMount function to use the | |
// handlepic function we just created and therefore | |
// render the picture to the screen | |
componentDidMount() { | |
this.handlepic() | |
} |
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
import axios from 'axios' | |
// Create a KEY variable for the NASA API key you received earlier | |
// Make sure it's in quotations | |
const KEY = 'YOUR KEY' | |
// Create a nasa variable that we will use to perform our API request | |
// Axios is going to create a url for us that conforms to NASA's | |
// specifications | |
let nasa = axios.create({ |
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
it('should slide through gallery', async () => { | |
const gallery = await browser.$('.open-gallery-button') | |
await gallery.click() | |
await delay(2000) | |
const rightSwipe = await browser.$('.right-arrow') | |
await rightSwipe.click() | |
await delay(2000) | |
const paragraph = await browser.$$( | |
'div:nth-of-type(3) .caption-drawer .post-content p' | |
) |
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
version:2.1 |
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
# This code is licensed from CircleCI to the user under the MIT license. See | |
# https://circleci.com/orbs/registry/licensing for details. | |
version: 2.1 | |
description: | | |
A set of tools for working with Amazon S3. Requirements: bash | |
Source: https://github.com/circleci-public/circleci-orbs | |
examples: | |
basic_commands: |
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
Object.keys(productionDays) | |
.sort() | |
.map((productionDay) => { | |
const groupCastMembersByRoleType = {} | |
productionDays[productionDay].map((castMember) => { | |
if ( | |
typeof groupCastMembersByRoleType[castMember.type] === 'undefined' | |
) { | |
groupCastMembersByRoleType[castMember.type] = { | |
roleType: castMember.type, |
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
Object.keys(data).sort().map((item, key) => { | |
const grouped = {}; | |
data[item].map(item => { | |
if (typeof grouped[item.type] === 'undefined') { | |
grouped[item.type] = { | |
name: item.type, | |
members: [item] | |
}; | |
} | |
else { |
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
import { expect } from 'chai'; | |
import * as sinon from 'sinon'; | |
import * as dayjs from 'dayjs'; | |
import * as mongoose from 'mongoose'; | |
import { set } from 'lodash'; | |
import * as sut from './paymentProviderSettlements.rules'; | |
import * as model from './paymentProviderSettlements.models'; | |
import * as paymentRules from '../../models/payments.rules'; | |
import { IPayments } from '../../models/payments.types'; | |
import { IPaymentProviderSettlements } from './paymentProviderSettlements.types'; |
OlderNewer