Skip to content

Instantly share code, notes, and snippets.

@aboutDavid
aboutDavid / fetch.php
Last active Apr 18, 2021
How to fetch every package name on npm using node.js (requires a lot of memory)
View fetch.php
console.log("Grabbing list of all packages from npm...");
var request = require("sync-request");
const cliProgress = require("cli-progress");
var res = request("GET", "https://skimdb.npmjs.com/_all_docs");
const fs = require("fs");
var packages = JSON.parse(res.getBody("utf8")).rows;
var packagejson = {
name: "all-packages-in-a-json-file",
version: "1.0.0",
@aboutDavid
aboutDavid / public.pgp
Created Mar 7, 2021
My public PGP key
View public.pgp
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQINBGAQXIgBEADAd4jzlj4HMUUsMfDKLo45nl6Ijl6VorDHYZbWcBUx5YZUDtIu
cVE8rqR6zTwyYwvkGg6KZUKYEiYxcbjmY9D2tl1JYToe2BhpwKJjlm7uxJvt3Rir
ZST+72BHbjhGGiyqh0UgFjA7hoyPWrqF6H+TfnA+lsY4Z1As7xzC4+g7M2ixWNXz
NlAFilzzx4a7jXdU8mihvRBytsfXPcp6kJ/sApqg5IgkVBxIRWaN96BbzgGpQErV
F3cw6y7t0EQY7p1nuaPJ1HJT3NS09myvFtvojqbskNjcy5R/6LFb4TXgZ1+xkxHg
M9N019BtduQpNc6LeFvCfXmr3FcWZ66QFJCNa4PqE/7lG6lSQky+kzPqiDbfCT/P
2ArgRJymU6zVLvJnGsXgQVkd/L61XFiclSql7/pM3g1EeQC0lOqfJLUa2m4GYm2B
l1pgQmwi/JTLSaG6TqoXjm4dTzwAu65pF8AZogz5d0T/7smho/CjfZJEW7XwyuDr
View keybase.md

Keybase proof

I hereby claim:

  • I am aboutdavid on github.
  • I am aboutdavid (https://keybase.io/aboutdavid) on keybase.
  • I have a public key ASCepr-g9NOR8BjZpA26FMsHxbSXRYoxADtvU_Yx8KFMQgo

To claim this, I am signing this object:

@aboutDavid
aboutDavid / README.md
Last active Dec 28, 2020
The CSS for notion exported pages
View README.md

notion.css

This is the css for notion exported pages.

Note: It does not have components like buttons, toggles, etc.

Docs:

Getting started:

<!DOCTYPE html><html lang="en"><link href="https://min.gitcdn.link/cdn/aboutDavid/35402fb563d0420a6430392bee98ab18/raw/c1cae1bdf2a43766204dabc1905e26826d8cb9ab/notion.css" rel="stylesheet"/> <article class="page sans"> <header> <h1 class="page-title">Hello World!</h1> <div class="page-body"> <p>This is a demo page!</p><p></p></div></header></article></html>
@aboutDavid
aboutDavid / README.md
Created Nov 6, 2020
How to use Twemoji in your site.
View README.md

Step 1: Add the Twemoji library to your <head> tag.

<!DOCTYPE html>
<head>
+ <script src="https://twemoji.maxcdn.com/v/latest/twemoji.min.js" crossorigin="anonymous"></script>
</head>
...

Step 2: Add the parser script after the closing <body> tag.

@aboutDavid
aboutDavid / articles.css
Created Oct 25, 2020
My hashnode blog's custom CSS (blog.aboutdavid.me)
View articles.css
/* Headers */
.blog-header {
background-color: #00FA9A; /* Header background color */
/* Sticky header */
position: -webkit-sticky; /* Safari support */
position: sticky;
top: 0;
padding-bottom:3;
}
.mode-dark .blog-header {