Skip to content

Instantly share code, notes, and snippets.

@aburd
aburd / a.md
Last active November 12, 2016 10:24 — forked from mala/a.md
Investigation into the Live HTTP Headers Chrome Extension (Introduced by CoolBar.Pro - An investigation into what the extension is actually doing)
@aburd
aburd / app.go
Last active July 5, 2018 04:46
A simple example of using Websockets in Go with the Gorilla lib
package main
import (
"fmt"
"net/http"
"github.com/gorilla/websocket"
)
var upgrader = websocket.Upgrader{}
@aburd
aburd / js_object_map_get_set_comparison.js
Created October 12, 2019 16:22
Comparison of getting and setting speeds of Object vs. Map in Javascript (Map writes are very slow)
const testKeyName = 'foo'
const testAmount = 100000000
const obj = { [testKeyName]: 'bar' }
const map = new Map()
map.set(testKeyName, 'bar')
let objTestName = `Reading a property from obj ${testAmount} times`
console.time(objTestName)
for (let i = 0; i < testAmount; i++) {
obj[testKeyName]
import Puppeteer from 'puppeteer';
import { mapSeries } from 'bluebird';
import fs from 'fs';
const url = 'https://cdnjs.com/libraries';
async function getNewPages(browser: Puppeteer.Browser, page: Puppeteer.Page) {
console.log(`Getting libraries...`);
const urls = await page.$$eval('.title a', (els) =>
els.map((el) => (el as HTMLAnchorElement).href),
@aburd
aburd / github_report.js
Created October 21, 2021 07:34
Get a report from a github issue
function daysUntilClosed() {
const hSel = "#partial-discussion-header relative-time"
const hSelEl = document.querySelector(hSel)
const d1 = new Date(hSelEl.title)
const hSel2 = "relative-time"
const hSelEls = document.querySelectorAll(hSel2)
const hSelEl2 = hSelEls[hSelEls.length - 1]
const d2 = new Date(hSelEl2.title)
@aburd
aburd / shell-script-model.sh
Created October 28, 2022 02:57 — forked from e-picas/shell-script-model.sh
A Bash script model with common options (verbose, force etc) & minimal functions (error, usage etc) to use and re-use to build your own shell scripts easily.
#!/usr/bin/env bash
#
# Bash script model
#
# A Bash script model with common options (verbose, force etc)
# & minimal functions (error, usage etc)
# to use and re-use to build your own shell scripts easily.
#
# To begin, run one of the followings:
#
@aburd
aburd / md-index.clj
Last active May 13, 2024 01:19
babashka script to make a markdown index for any markdown file
#!/usr/bin/env bb
(require '[clojure.string :as s])
(defn usage []
(println "md-index.clj [target-markdown-file]"))
(let [[p] *command-line-args*]
(when (or (nil? p) (not (s/ends-with? p ".md")))
(usage)
(System/exit 1))
@aburd
aburd / id_rsa.pub
Created October 14, 2024 14:00
id_rsa.pub
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDzYMPY+bv+jJN9VWyRXQe02KnQJ2jNNW74uRoZ7oboQu74Y0KU38fRZocYke5OOBeLrEwG0OJ6nyD/O+nCY3hqpcBdmDS1izl4J7hjCNswo/ZRtda6mCSgLc69CoMxYbV233Lw6f7gfU78UGguRQIvoYrPfQMfWPh/LuH9S3sTAZkPWWiBYAYeMZtfO1MUNpJQefEgCSOWb14xB+NKNvDCho4sofBIha/1IkF9HbVt0eJ2hp3GZipl2JUkQbgj4h2vAnKyJT3r5E+j5UsbYWZ/9aQZhMJBYiFu7ea+CSGzkOoSighX6U2ke5kvTYRe0naby642F/QUmU2tEZw0Pcgfp0ohPvySoaLu8LRTstnHq7JRqogfFBMU5zzhStAB2Te0AnFdezcxqO8EecnBwAjN8Wptvvlol3/ut+YcwXsQEZ9ZX6OtXn4d9uLhiTZT3xVb1SYAwRNQkW48TrU2CacRsiODrzfSuOfZtec/eoi/RO5ZWWgm/e1S+bZR8ha09Xk= aburd@framejerk