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 React from 'react'; | |
import { fireEvent, render, screen, waitFor } from '@tests/utils'; | |
import ConfirmationDialog, { useConfirmationDialog } from './ConfirmationDialog'; | |
function fakePromise() { | |
let resolve; | |
const promise = new Promise((promiseResolve) => { | |
resolve = promiseResolve; | |
}); |
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 * as AWS from 'aws-sdk' | |
import { Connection } from '@elastic/elasticsearch' | |
class AwsConnector extends Connection { | |
async request(params, callback) { | |
const creds = await this.getAWSCredentials() | |
const req = this.createRequest(params) | |
const { request: signedRequest } = this.signRequest(req, creds) | |
super.request(signedRequest, callback) |
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 React, { useReducer, useEffect } from 'react'; | |
import ReactDOM from 'react-dom'; | |
const rowStyle = { | |
display: 'flex' | |
} | |
const squareStyle = { | |
'width':'60px', | |
'height':'60px', |
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
echo OFF | |
set folder="C:\Users\rodri\Desktop\ip" | |
del "%folder%\hosts" | |
ubuntu1804 -c "ip addr | grep 'eth0' | grep 'inet' | grep -o -P 'inet.{0,14}' | grep -E -o '([0-9]{1,3}[\.]){3}[0-9]{1,3}'" > "%folder%\ip.txt" | |
set /p ip=<"%folder%\ip.txt" | |
echo %ip% | |
echo f | copy /Y "%folder%\hosts-copy" "%folder%\hosts" | |
(echo. & echo %ip% local.gofind) >> %folder%\hosts | |
copy /Y "%folder%\hosts" "C:\Windows\System32\drivers\etc\hosts" | |
PAUSE |
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 React, { createContext, useState } from 'react' | |
import Snackbar from '@material-ui/core/Snackbar' | |
import Button from '@material-ui/core/Button' | |
import IconButton from '@material-ui/core/IconButton' | |
const Context = createContext() | |
function RenderSnack({ id, message, open, handleClose }) { | |
const messageId = `message-${id}` | |
return ( |
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
const initialState = { | |
project: "My-App", | |
lists: [ | |
{ | |
id: 1, | |
title: "A Fazer", | |
cards: [ | |
{ | |
id: 1, | |
description: "Comprar Pao" |
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
/* | |
A: Qual o typeof de result? | |
- string | |
- number | |
- object | |
- function | |
B: Qual o resultado do log? | |
- result is not a function | |
- 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
a |
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
const request = require('request'); | |
const cheerio = require('cheerio'); | |
function priceToNumber(str) { | |
if (!str) | |
return 0; | |
if (typeof str !== 'string') | |
return str; |