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 Apify = require('apify'); | |
Apify.main(async () => { | |
// Get queue and enqueue first url. | |
const requestQueue = await Apify.openRequestQueue(); | |
const enqueueUrl = async url => requestQueue.addRequest(new Apify.Request({ url })); | |
await enqueueUrl('https://news.ycombinator.com/'); | |
const crawlerConfig = { | |
launchPuppeteerOptions: { |
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
<# | |
.SYNOPSIS | |
Gets a PowerShell Credential (PSCredential) from the Windows Credential Manager | |
.DESCRIPTION | |
This module will return a [PSCredential] object from a credential stored in Windows Credential Manager. The | |
Get-StoredCredential function can only access Generic Credentials. | |
Alias: GSC |
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
# Modified from: http://stackoverflow.com/a/11010158/215200 | |
$fromFolder = "D:\FOLDER\" | |
$rootName = "FILENAME" | |
$ext = "EXT" | |
$from = "{0}{1}.{2}" -f ($fromFolder, $rootName, $ext) | |
$fromFile = [io.file]::OpenRead($from) | |
$upperBound = 100MB |
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
/*--- waitForKeyElements(): A utility function, for Greasemonkey scripts, | |
that detects and handles AJAXed content. | |
Usage example: | |
waitForKeyElements ( | |
"div.comments" | |
, commentCallbackFunction | |
); |