Skip to content

Instantly share code, notes, and snippets.

View aboutdavid's full-sized avatar

David M aboutdavid

View GitHub Profile
@aboutdavid
aboutdavid / install_ca.ps1
Last active July 13, 2023 21:40
Installing the CA on Windows using Powershell
Invoke-WebRequest -URI "https://gist.githubusercontent.com/aboutdavid/f36547bb2a587a3adfd37c0e5e3c8a14/raw/5e47cb82fa6cc7ab53f2d63b5593a16f56445bef/outernet_ca.crt" -OutFile C:\outernet.crt
$file=(Get-ChildItem -Path "C:\outernet.crt")
$file | Import-Certificate -CertStoreLocation cert:\LocalMachine\Root
@aboutdavid
aboutdavid / fetch.js
Last active October 31, 2021 15:15
Get all emojis from twitchemotes.com
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 April 18, 2021 18:58
How to fetch every package name on npm using node.js (requires a lot of memory)
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
Last active September 30, 2023 17:02
My public PGP key
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQGNBGUYUR0BDADBJLypjHStJIuYGk+8eIQMoBqRzUSalgGmQsfcffKG476wqRi6
3jcf5UseuttaqpTLeb92CA8JF98JkmScTisRLgBHkJk13BJLBmY6byIueT+//MGR
RLj2aNVW2irmd5sTULKzGFQ+0EfbLUPm+oXYl6LU7kEKZInwp671+Xmehax0ldON
sGAfsJiJp3xBM6FvxA8LplRWqL3Mhbh/pfLA6SMTgG8Ig4W6sNQ12LWsfhK/HHMb
gUCSujlr7g5Ffl80v2PIgXX5NUHHyHxV+Y2qKcn2PJlgkvlICZZuGiO9p6pI69De
l7UoqCUjhkfRTLgls5lPJrzZMK4SozRkHVUJ/D7/Humj8aPNmCnfcKnb9ZVsKBpH
fTNjiFPZoe03ILR7wrCFfsalqF5fpKDuzc5gs4AnHiOQRm13Z0NU5KtrhcRVItcy
qe1Ig0ZQiDrLiLFwpZ6lA9x6ZtnhrGVtYWOmSvjsnPMMksZkn5Xyew7c/jheYPhm

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 October 10, 2023 13:49
The CSS for notion exported pages

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 November 6, 2020 20:29
How to use Twemoji in your site.

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 October 25, 2020 21:03
My hashnode blog's custom CSS (blog.aboutdavid.me)
/* 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 {