Table of Contents
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
| a4b.amazonaws.com | |
| access-analyzer.amazonaws.com | |
| account.amazonaws.com | |
| acm-pca.amazonaws.com | |
| acm.amazonaws.com | |
| airflow-env.amazonaws.com | |
| airflow.amazonaws.com | |
| alexa-appkit.amazon.com | |
| alexa-connectedhome.amazon.com | |
| amazonmq.amazonaws.com |
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
| const http = require("http"); | |
| const server = http.createServer(); | |
| const PORT = 80; | |
| server | |
| .on("request", (request, response) => { | |
| let body = []; | |
| request | |
| .on("data", (chunk) => { | |
| body.push(chunk); |
Magic words:
psql -U postgresSome interesting flags (to see all, use -h or --help depending on your psql version):
-E: will describe the underlaying queries of the\commands (cool for learning!)-l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)
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
| const { readFile } = require('fs') | |
| readFile(__filename, () => { | |
| new Promise(function (resolve, reject) { | |
| console.log('new promise') | |
| resolve() | |
| }).then(() => { | |
| console.log('then 1') | |
| }) |
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
| new Promise(function (resolve, reject) { | |
| console.log('new promise') | |
| resolve() | |
| }).then(() => { | |
| console.log('then 1') | |
| }) | |
| async function foo () { | |
| console.log('async function') |
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
| const fs = require("fs"); | |
| fs.readFile(__filename, () => { | |
| // Adding a callback to the timers FIFO queue with setTimeout | |
| setTimeout(() => { | |
| console.log("a"); | |
| }); | |
| // Adding a callback to the immediate FIFO queue with setImmediate | |
| setImmediate(() => { |
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
| // Adding a callback to the timers FIFO queue with setTimeout | |
| setTimeout(() => { | |
| console.log("a"); | |
| }); | |
| // Adding a callback to the immediate FIFO queue with setImmediate | |
| setImmediate(() => { | |
| console.log("b"); | |
| }); |
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
| // Calling .then on a resolved Promise | |
| new Promise((resolve, reject) => { | |
| resolve("a"); | |
| }).then((value) => { | |
| console.log(value); | |
| }); | |
| // Calling .catch on a rejected Promise | |
| new Promise((resolve, reject) => { | |
| reject(new Error("a")); |
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
| package main | |
| import ( | |
| "fmt" | |
| "os" | |
| "runtime" | |
| "sync" | |
| "time" | |
| ) |
NewerOlder