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
| # Set your GitHub username and access token | |
| $githubUsername = "abc" | |
| $githubToken = "YOUR_TOKEN" | |
| # Get repositories | |
| $repos = Invoke-RestMethod -Uri "https://api.github.com/users/$githubUsername/repos" -Method Get | |
| # Loop through each repository and update it | |
| foreach ($repo in $repos) { | |
| $repoName = $repo.name |
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
| { | |
| "orders": [ | |
| { | |
| "store_name": "Loja 4", | |
| "store_directory_name": "loja-4", | |
| "store_logo": "http://loja.dev.local:3002/store/logos/4_aaa229139880f95b20e60452929230606163d178.png?1666966575", | |
| "store_informations": [], | |
| "store_address": "Italino Peruffo, 81650-330 - Boqueirão - Curitiba/PR", | |
| "state": "complete", | |
| "payment_state": "paid", |
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
| { | |
| "orders": [ | |
| { | |
| "store_name": "Loja 2", | |
| "store_directory_name": "loja-2", | |
| "store_logo": "http://loja.dev.local:3002/store/logos/2_8503ab1cf9ac0e20367cc664f94028c0ecd746ea.png?1666966575", | |
| "store_informations": [], | |
| "store_address": "Italino Peruffo, 81650-330 - Boqueirão - Curitiba/PR", | |
| "state": "complete", | |
| "payment_state": "balance_due", |
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
| try { | |
| const formData = new FormData(); | |
| const { data: stream } = await axios.get( | |
| "https://images.unsplash.com/photo-1611095785020-1ba3dd228ea7?ixid=MXwxMjA3fDF8MHxlZGl0b3JpYWwtZmVlZHwxfHx8ZW58MHx8fA%3D%3D&ixlib=rb-1.2.1&auto=format&fit=crop&w=900&q=60", | |
| { responseType: "stream" } | |
| ); | |
| formData.append("files", stream); | |
| formData.append("ref", "api::article.article"); // Collection name |
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
| await Promise.all([ | |
| new Promise((resolve) => setTimeout(() => {resolve('A (slow)'); console.log('A (slow)')}, 1000)), | |
| new Promise((resolve) => setTimeout(() => {resolve('B (slower)'); console.log('B (slower)')}, 2000)), | |
| new Promise((resolve) => setTimeout(() => {resolve('C (fast)'); console.log('C (fast)')}, 10)) | |
| ]) | |
| const promises = Array.from({ length: 1000 }, (_, i) => i).map(item => new Promise((resolve) => setTimeout(() => { | |
| resolve('A'); | |
| console.log('resolved') | |
| }, 3000))) |
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 React, { useEffect } from 'react'; | |
| import { Editor, EditorState } from 'draft-js'; | |
| import { useState } from 'react'; | |
| import 'draft-js/dist/Draft.css'; | |
| import createToolbarPlugin from '@draft-js-plugins/static-toolbar'; | |
| const staticToolbarPlugin = createToolbarPlugin(); | |
| const { Toolbar } = staticToolbarPlugin; |
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 LeafletSearch from './leaflet-search'; | |
| const { $ } = window; | |
| window.requestAnimationFrame.mockRestore(); | |
| const waitRAF = () => new Promise((resolve) => requestAnimationFrame(resolve)); | |
| const simulateKeyboardInput = async (text, inputElement) => { | |
| /* |
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 Base from '@/components/base'; | |
| const { $ } = window; | |
| export default class extends Base { | |
| constructor($element) { | |
| super($element); | |
| this.content = document.querySelectorAll('.leaflet-content__text'); | |
| this.$nextBtn = $("button[data-search='next']"); |