Setup
PUT doc-count-fun
POST doc-count-fun/_doc
{
"_doc_count": 10,
"@timestamp": "2023-09-14T10:00:00.477Z"
}
PUT doc-count-fun
POST doc-count-fun/_doc
{
"_doc_count": 10,
"@timestamp": "2023-09-14T10:00:00.477Z"
}
Der kan max trækkes ca. 5000 boliger via api'et af gangen. Man er derfor nødt til at bruge pagination og filtering for at få det hele med.
await
Cypress methodsGiven this backend task:
// plugins.ts
const plugin: Cypress.PluginConfig = (on, config) => {
on('task', {
async waitForMe(ms: number) {
return new Promise((resolve) => {
Automatic fix
Open the terminal and set the correct date:
ntpdate -u time.apple.com
/* | |
* Run timers (setInterval/setTimeout) every tick continuously until the promise has been resolved | |
*/ | |
async function runTimersUntilResolved(fn: () => Promise<any>) { | |
jest.useFakeTimers(); | |
let isResolved = false; | |
const p = fn(); | |
p.finally(() => (isResolved = true)); |
hidutil property --set '{"UserKeyMapping":[{"HIDKeyboardModifierMappingSrc":0x700000064,"HIDKeyboardModifierMappingDst":0x700000035},{"HIDKeyboardModifierMappingSrc":0x700000035,"HIDKeyboardModifierMappingDst":0x700000064}]}'
[user] | |
name = John Doe | |
email = johndoe@gmail.com |
import { useRef } from 'react'; | |
let uniqueId = 0; | |
const getUniqueId = () => uniqueId++; | |
export function useComponentId() { | |
const idRef = useRef(getUniqueId()); | |
return idRef.current; | |
} |