Skip to content

Instantly share code, notes, and snippets.

View DiegoTeles's full-sized avatar
🦄
youtube.com/UnicornCoder

Diego Telles DiegoTeles

🦄
youtube.com/UnicornCoder
View GitHub Profile

TCPSERVERWRAP TickObject TCPWRAP Timeout TIMERWRAP HTTPPARSER Timeout TIMERWRAP TickObject TickObject

var asyncHooks = require('async_hooks')
const fs = require('fs');
var hooks = {
init,
// before, Está comentado por não estar sendo usado
// after,
// destroy
}
var asyncHook = asyncHooks.createHook(hooks)
const http = require('http');
http.createServer(function (req, res) {
res.end('Hello World')
}).listen(8079);
@DiegoTeles
DiegoTeles / convertTimeZone.js
Created April 4, 2019 20:16
List TimeZone | Convert TimeZone function
let brTime = new Date()
.toLocaleString("BRST", {
timeZone: "America/Sao_Paulo"
});
brTime = new Date(brTime);
const arrayMoney = [
{
id: 1,
name: 'Luly',
location: 'Sao Paulo',
money: 32.12
},
{
id: 2,
name: 'Bob',
const animalArray = [
{
id: 1,
name: 'Luly',
location: 'Sao Paulo',
type: 'dog'
},
{
id: 2,
name: 'Bob',
const usersList = [
{
id: 1,
name: 'Diego Telles',
location: 'Sao Paulo',
comunidade: [
{
name: 'THT',
local: 'Brasil',
},
const usersList = [
{
id: 1,
name: 'Diego Telles',
location: 'Sao Paulo',
comunidade: [
{
name: 'THT',
local: 'Brasil',
},
const usersList = [
{
id: 1,
name: 'Diego Telles',
location: 'Sao Paulo',
comunidade: [
{
name: 'THT',
local: 'Brasil',
},
[
{
"id": "2740e46d.959624",
"type": "http in",
"z": "bc2f777c.4b5e7",
"name": "Pokemon List",
"url": "/pokemon/:id/",
"method": "get",
"upload": false,
"swaggerDoc": "",