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
package main | |
import ( | |
"fmt" | |
"io" | |
"log" | |
"net/http" | |
) | |
func main() { |
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
Show hidden characters
{ | |
"compilerOptions": { | |
"outDir": "dist/app", | |
"target": "ES6", | |
"noEmitOnError": true, | |
"module": "NodeNext", | |
"moduleResolution": "NodeNext", | |
"removeComments": true, | |
"strictNullChecks": true, | |
"emitDecoratorMetadata": true, |
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 { createReadStream, createWriteStream, writeFile } from 'node:fs'; | |
import { Transform, Writable } from 'node:stream'; | |
import JSONStream from 'JSONStream'; | |
import axios from 'axios'; | |
// const readStream = createReadStream('./products.json', { encoding: 'utf8' }); | |
let jsonString = ''; | |
const url = 'https://apexapps.oracle.com/pls/apex/cetools/api/v1/products/?currencyCode=BRL'; | |
/** |
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
#!/bin/bash | |
webpages=( | |
"https://dictionary.cambridge.org/dictionary/" | |
"https://www.oxfordlearnersdictionaries.com/us/" | |
"https://context.reverso.net/traducao/" | |
"https://synonyms.reverso.net/synonym/" | |
"https://tophonetics.com/" | |
"https://translate.google.com/" | |
) |
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
// The "-r" flag allows you to preload a module when running Node, see https://www.stephenlewis.me/blog/node-dash-r | |
"scripts": { | |
"start": "CLIMEM=8999 node -r climem index.js", | |
"climem": "npx climem 8999", | |
"test": "npx autocannon -c 100 -d 30 -p 10 http://localhost:3000" | |
} |
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
export default class ErrorCustom { | |
constructor(public message: string, public code: number){ | |
this.message = message | |
this.code = code | |
} | |
} |
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
// Wrong away | |
const poolCountResponse = await api.get('http://localhost:3333/pools/count') | |
const guessCountResponse = await api.get('http://localhost:3333/guesses/count') | |
// Correct way | |
const [poolCountResponse, guessCountResponse] = await Promise.all([ | |
api.get('http://localhost:3333/pools/count'), | |
api.get('http://localhost:3333/guesses/count') | |
]) |
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
start(() => { | |
while(true) | |
{ | |
print("a"); | |
sleep(1000); | |
} | |
}) | |
while(true) | |
{ |
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
{ | |
"emmet.syntaxProfiles" : { | |
"javascript" : "jsx" | |
}, | |
"workbench.startupEditor" : "newUntitledFile", | |
"editor.fontSize" : 16, | |
"javascript.suggest.autoImports" : true, | |
"javascript.updateImportsOnFileMove.enabled" : "always", | |
"editor.rulers" : [ | |
80, |
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
/* The date you wanna change */ | |
const date = '06/10/22' | |
const register = document.querySelector('#lb_DtRegistro') | |
const sent = document.querySelector('#lb_DtEnvio') | |
const destiny = document.querySelector('#lb_DtDestino') | |
register.innerText = date | |
sent.innerText = date | |
destiny.innerText = date |
NewerOlder