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 p = Promise.resolve(); | |
(async ()=> { | |
await p; | |
console.log('after:await'); | |
})(); | |
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
<Project Sdk="Microsoft.NET.Sdk"> | |
<PropertyGroup> | |
<TargetFramework>netcoreapp2.1</TargetFramework> | |
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles> | |
<AWSProjectType>Lambda</AWSProjectType> | |
</PropertyGroup> | |
<ItemGroup> | |
<None Remove="appsettings.json" /> | |
</ItemGroup> | |
<ItemGroup> |
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
console.log('Loading function'); | |
var AWS = require('aws-sdk'); | |
var dynamo = new AWS.DynamoDB.DocumentClient(); | |
exports.handler = async (event, context, 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
"workbench.colorCustomizations": { | |
//"editor.selectionBackground": "#13ff0b83", | |
"editor.selectionHighlightBackground": "#13ff0b9a", | |
"editor.lineHighlightBackground": "#2b373a70", | |
"editor.wordHighlightBackground": "#13ff0b9a", | |
"editor.findMatchHighlightBackground": "#00ecfdb0", | |
"editor.wordHighlightStrongBackground": "#f812c68f", // syntax variable assignment |
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
using System; | |
using Microsoft.EntityFrameworkCore; | |
using Microsoft.EntityFrameworkCore.Metadata; | |
namespace ConsoleApp2.Models | |
{ | |
public partial class MyContext : DbContext | |
{ | |
public MyContext() | |
{ |
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
//Install express server2 | |
import express from 'express'; | |
import * as url from 'url'; | |
const sharp = require('sharp'); | |
var request = require('request'); | |
export {}; | |
var cors = require('cors'); |
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 puppeteer, {ElementHandle, Page} from "puppeteer"; | |
import {LOGIN_URL, USER} from "./models/consts"; | |
import {IUser} from "./models/i-user"; | |
const getPropAsync = async (elementHandle: ElementHandle, propertyName: string) => | |
{ | |
let href = await elementHandle.getProperty(propertyName); | |
return await (await elementHandle.getProperty(propertyName)).jsonValue(); | |
}; |
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 puppeteer, {ElementHandle} from "puppeteer"; | |
const getPropAsync = async (elementHandle: ElementHandle, propertyName: string) => | |
{ | |
let href = await elementHandle.getProperty(propertyName); | |
return await (await elementHandle.getProperty(propertyName)).jsonValue(); | |
}; | |
const getElementsAsync = (async (selector: string, section: ElementHandle | null, propertyName: string | null, page) => | |
{ | |
let cubes: ElementHandle[] = []; |
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 puppeteer, {ElementHandle} from "puppeteer"; | |
(async () => | |
{ | |
const browser = await puppeteer.launch({headless: false}); | |
const page = await browser.newPage(); | |
let url = "https://www.mutualart.com/Artists"; | |
console.log(`Fetching page data for : ${url}...`); | |
await page.goto(url); |
NewerOlder