Skip to content

Instantly share code, notes, and snippets.

View oleksanderzap's full-sized avatar

Zaplitnyi Oleksander oleksanderzap

View GitHub Profile
// Option 1
async function streamToString(stream: NodeJS.ReadableStream): Promise<string> {
const chunks: Array<any> = [];
for await (let chunk of stream) {
chunks.push(chunk)
}
const buffer = Buffer.concat(chunks);
return buffer.toString("utf-8")
}
@oleksanderzap
oleksanderzap / create-ssl-for-localhost
Created November 8, 2019 09:33 — forked from itsMattShull/create-ssl-for-localhost
Command to create a key.pem and cert.pem for localhost
openssl req \
-newkey rsa:2048 \
-x509 \
-nodes \
-keyout key.pem \
-new \
-out cert.pem \
-subj /CN=localhost \
-reqexts SAN \
-extensions SAN \
{"lastUpload":"2019-10-02T18:02:32.054Z","extensionVersion":"v3.4.3"}
@oleksanderzap
oleksanderzap / meta-tags.md
Created March 18, 2018 22:51 — forked from kevinSuttle/meta-tags.md
List of Usable HTML Meta and Link Tags

Copied from http://code.lancepollard.com/complete-list-of-html-meta-tags/

Basic HTML Meta Tags

<meta charset='UTF-8'>
<meta name='keywords' content='your, tags'>
<meta name='description' content='150 words'>
<meta name='subject' content='your website's subject'>
<meta name='copyright' content='company name'>
User table
id: number
name: string
pass: string
photo: string
UserProfile table
id: number
userId: string