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 { JSDOM } = require('jsdom'); | |
const got = require('got').default; | |
const WIKIPEDIA_URL = 'https://en.wikipedia.org/wiki'; | |
/** | |
* Check if the person with `firstName` and `lastName` is currently alive. | |
* | |
* @param {string} firstName | |
* @param {string} lastName |
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 http = require('http') | |
const server = http.createServer((req, res) => { | |
console.log('%s - %s', req.method, req.url) | |
if (req.url === '/frame') { | |
setTimeout(() => { | |
res.setHeader('Content-Type', 'text/html') | |
res.write(` | |
<!DOCTYPE html> |
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
function fillBucket(remainingWeight, piles, n) { | |
if (n === 0 || remainingWeight === 0) { | |
return 0; | |
} | |
const pile = piles[n - 1]; | |
if (pile.weight > remainingWeight) { | |
return fillBucket(remainingWeight, piles, n - 1); | |
} |
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 chromium = require('chrome-aws-lambda'); | |
const puppeteer = require('puppeteer'); | |
const axeCore = require('axe-core'); | |
const { createServer } = require('http'); | |
const { parse: parseURL } = require('url'); | |
const { PORT = 3000 } = process.env; | |
const analyze = async url => { | |
let browser; |
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
<build> | |
<plugins> | |
<plugin> | |
<groupId>org.jacoco</groupId> | |
<artifactId>jacoco-maven-plugin</artifactId> | |
<version>0.8.1</version> | |
<executions> | |
<execution> | |
<goals> |
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
∴ npm search slugify | |
npm WARN Building the local index for the first time, please be patient | |
⸨░░░░░░░░░░░░░░░░░░⸩ ⠹ : WARN Building the local index for the first time, please be patient | |
<--- Last few GCs ---> | |
33486 ms: Scavenge 1020.6 (1434.2) -> 1020.5 (1434.2) MB, 3.9 / 0 ms (+ 0.0 ms in 2 steps since last GC) [allocation failure]. | |
33490 ms: Scavenge 1020.5 (1434.2) -> 1020.5 (1434.2) MB, 3.9 / 0 ms [allocation failure]. | |
34443 ms: Mark-sweep 1020.5 (1434.2) -> 1020.4 (1434.2) MB, 952.7 / 0 ms (+ 738.6 ms in 3969 steps since start of marking, biggest step 6.6 ms) [last resort gc]. | |
35417 ms: Mark-sweep 1020.4 (1434.2) -> 1020.4 (1434.2) MB, 974.3 / 0 ms [last resort gc]. |
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/ioutil" | |
"net/http" | |
"os" | |
"regexp" | |
) |
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
CREATE TABLE "user" ( | |
id uuid DEFAULT uuid_generate_v1mc() NOT NULL, | |
organization_id uuid, | |
username character varying(255) NOT NULL, | |
email character varying(255) NOT NULL, | |
fancy_username_or_whatever varying(255) NOT NULL, | |
password character varying(255), | |
reset_token character varying(255), | |
reset_expiry timestamp with time zone, | |
is_admin boolean DEFAULT false NOT NULL, |
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
$ valgrind --leak-check=full ./test | |
==5801== Memcheck, a memory error detector | |
==5801== Copyright (C) 2002-2011, and GNU GPL'd, by Julian Seward et al. | |
==5801== Using Valgrind-3.7.0 and LibVEX; rerun with -h for copyright info | |
==5801== Command: ./test | |
==5801== | |
# Test: parse_simple | |
OK |
NewerOlder