Skip to content

Instantly share code, notes, and snippets.

Avatar
🌴
On vacation

David aboutdavid

🌴
On vacation
View GitHub Profile
@aboutdavid
aboutdavid / fetch.js
Last active Oct 31, 2021
Get all emojis from twitchemotes.com
View fetch.js
var emotes = [];
var i = 0;
var img = document.querySelectorAll("img");
var center = document.querySelectorAll("center");
while (i < img.length) {
if (!img[i].getAttribute("data-regex")) i++;
if (!center[i]) break;
emotes.push({ name: img[i].getAttribute("data-regex"), src: img[i].src });
i++;
}
@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 Jul 30, 2022
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:

   Hello World!  This is a demo page!
@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 {