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 productApiResponses = await Promise.all( | |
itemNumbers.map(async (itemNumber: string) => { | |
try { | |
const productAPIResponse = await productService( | |
itemNumber, | |
productConfig, | |
locale | |
); | |
if (!productAPIResponse) return 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
Pre-req's: | |
Python 3 | |
A project that is git initialized | |
Windozs setup: | |
pip install pre-commit | |
MAC OS setup for pre-commit: |
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
// Note you may need to update the path to our sample data. | |
let data = require('./src/stories/menus/megaMenu/megamenu.json'); | |
const sortByName = (a, b) => { | |
return a.name > b.name ? 1 : b.name > a.name ? -1 : 0; | |
}; | |
// This function should be memoized for performance reasons. | |
const sortParent = (data) => { | |
let sortedData = [...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
Given an array of integers, return indices of the two numbers such that they add up to a specific target. | |
You may assume that each input would have exactly one solution, and you may not use the same element twice. | |
Example: | |
Given nums = [2, 7, 11, 15], target = 9, | |
Because nums[0] + nums[1] = 2 + 7 = 9, | |
return [0, 1]. |
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 Component from '@glimmer/component'; | |
export default class BlogPost extends Component { | |
} |
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
For non-interactive login: | |
For a v2 Token: | |
https://login.microsoftonline.com/<<TENANT_NAME>>.onmicrosoft.com/oauth2/v2.0/authorize?response_type=id_token&scope=openid%20profile&client_id=<<CLIENT_ID>>&redirect_uri=https%3A%2F%2Fjwt.ms&nonce=null | |
For a v1 Token: | |
https://login.microsoftonline.com/common/oauth2/authorize?client_id=<<CLIENT ID>>&response_type=id_token&nonce=null | |
For an interactive login (if you need to set an initial password) for B2C: |
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
First, be sure make sure you've set your git user.name and user.email: | |
git config --global user.name "FIRST_NAME LAST_NAME" | |
git config --global user.email [email protected] | |
Create new local branch to work in: | |
git checkout -b v1.0.0 | |
Set version number in your project's package.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 Ember from 'ember'; | |
export default Ember.Component.extend({ | |
}); |
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
//You could use faker.js to generate some testData | |
function chunk(arr, chunkSize) { | |
const R = []; | |
for (let i = 0, len = arr.length; i < len; i += chunkSize) { | |
R.push(arr.slice(i, i + chunkSize)); | |
} | |
return R; | |
} |
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 faker = require('faker'); | |
const testData = new Array(100).fill({}).map((v, i) => { | |
return { | |
name: faker.name.findName(), | |
address: faker.address.streetAddress(), | |
city: faker.address.city(), | |
state: faker.address.stateAbbr(), | |
postal: faker.address.zipCode(), | |
email: '' |
NewerOlder