Skip to content

Instantly share code, notes, and snippets.

View fafnirical's full-sized avatar

Wade Burelbach fafnirical

View GitHub Profile
@lfhbento
lfhbento / userscript.js
Last active April 19, 2025 11:52 — forked from spf13/script.js
Download all your Kindle books before Feb 26, 2025
// ==UserScript==
// @name Kindle Download
// @namespace http://tampermonkey.net/
// @version 2025-02-20
// @description Download all your kindle books
// @author You
// @match https://www.amazon.com/hz/mycd/digital-console/contentlist/booksPurchases/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=amazon.com
// @grant none
// ==/UserScript==
@spf13
spf13 / script.js
Last active April 2, 2025 08:03 — forked from danmactough/script.js
Download all your Kindle books before Feb 26, 2025
// 1. Log in to your Amazon account
// 2. Go to your Content Library > Books - https://www.amazon.com/hz/mycd/digital-console/contentlist/booksAll/dateDsc/
// 3. Open your browser's Javascript console
// 4. For each page of books, paste this script into the console
(async function () {
// Close the notification if it appears
function closeNotification() {
const notifClose = document.querySelector("span#notification-close");
if (notifClose) {
@gaearon
gaearon / 00-README-NEXT-SPA.md
Last active April 2, 2025 17:54
Next.js SPA example with dynamic client-only routing and static hosting

Next.js client-only SPA example

Made this example to show how to use Next.js router for a 100% SPA (no JS server) app.

You use Next.js router like normally, but don't define getStaticProps and such. Instead you do client-only fetching with swr, react-query, or similar methods.

You can generate HTML fallback for the page if there's something meaningful to show before you "know" the params. (Remember, HTML is static, so it can't respond to dynamic query. But it can be different per route.)

Don't like Next? Here's how to do the same in Gatsby.

@fworks
fworks / install-zsh-windows-git-bash.md
Last active April 9, 2025 09:11
Zsh / Oh-my-zsh on Windows Git Bash
@joe-watkins
joe-watkins / tableToD3Chart.js
Last active March 15, 2018 15:00
Table to D3/C3 Chart Demo - Making data for visualizations more accessible with dom scraping patterns
/*!
* tableToD3Chart();
* Author: Joe Watkins - [email protected]
*
* Scrape the dom for data and create C3/D3 based charts
*
* Defaults:
* chartTitleWrapper = the element wrapping text for chart label
* chartType = line, pie, donut, bar, spline, scatter etc. - see C3 docs
* useDom = true/false - if you don't want to scrape dom and want to define data use false
@tsiege
tsiege / The Technical Interview Cheat Sheet.md
Last active April 11, 2025 17:09
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

ANNOUNCEMENT

I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!






\

@caged
caged / svg-to-png.js
Created January 27, 2013 18:11
Convert SVG's to PNGs. This works OK if the SVG's styles are inline. The SVG element must contain an xmlns attribute. Webkit also requires you specify a font size on `text` elements.
var svg = document.getElementById('graph'),
xml = new XMLSerializer().serializeToString(svg),
data = "data:image/svg+xml;base64," + btoa(xml),
img = new Image()
img.setAttribute('src', data)
document.body.appendChild(img)
@mbostock
mbostock / README.md
Last active June 7, 2023 18:33
Underscore’s Equivalents in D3

Collections

each(array)

Underscore example:

_.each([1, 2, 3], function(num) { alert(num); });
@janmoesen
janmoesen / .bash_profile
Created August 19, 2011 06:01
Temporary .bash_profile
# ============== shell
# Case-insensitive globbing.
shopt -s nocaseglob;
# Do not overwrite files when redirecting using ">", ">&" or "<>".
# Note that you can still override this with ">|".
set -o noclobber;
# UTF-8 all the way.
export LC_ALL='en_GB.UTF-8';