Skip to content

Instantly share code, notes, and snippets.

View Natedude's full-sized avatar

Nate Natedude

View GitHub Profile
@christroutner
christroutner / slpdb-review.md
Last active November 20, 2021 07:11
SLPDB Review

SLP Indexing Review

Overview

This report was sponsored by an anonymous donor. I'd like to thank them for the generous contribution to the industry, the PSF, and to me.

The purpose of the report is to:

  • Assess the current state of SLPDB and SLP indexing in the industry.
  • Explore the costs of improving the indexer or creating a new one.

The SLPDB indexer gave rise to a prolific token economy on the Bitcoin Cash blockchain. eCash, a fork of Bitcoin Cash, also makes use of SLP tokens as well. Both ecosystems require a robust indexer in order to sustain their token economies.

@jeb5
jeb5 / Youtube Subs to OPML.js
Last active November 9, 2024 02:13
Youtube Subscriptions to RSS/OPML
const channels = [...document.querySelectorAll("#main-link.channel-link")].map(e => {
const [, a, b] = e.href.match("/((?:user)|(?:channel))/(.*)$");
const feed = "https://www.youtube.com/feeds/videos.xml?" + (a === "user" ? "user=" : "channel_id=") + b;
const channelName = e.querySelector("yt-formatted-string.ytd-channel-name").innerText;
return [feed, channelName];
});
if (channels.length == 0) {
alert("Couldn't find any subscriptions");
} else {
console.log(channels.map(([feed, _]) => feed).join("\n"));
@clifinger
clifinger / config.plist
Created November 9, 2019 06:02
Z390M Gaming, Last bios, Catalina, Clover boot (sleep working !)
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>ACPI</key>
<dict>
<key>AutoMerge</key>
<true/>
<key>DSDT</key>
From: http://www.labnol.org/software/wget-command-examples/28750/
How do I download an entire website for offline viewing? How do I save all the MP3s from a website to a folder on my computer? How do I download files that are behind a login page? How do I build a mini-version of Google?
Wget is a free utility – available for Mac, Windows and Linux (included) – that can help you accomplish all this and more. What makes it different from most download managers is that wget can follow the HTML links on a web page and recursively download the files. It is the same tool that a soldier had used to download thousands of secret documents from the US army’s Intranet that were later published on the Wikileaks website.
You mirror an entire website with wget
Mirror an entire website with wget
Spider Websites with Wget – 20 Practical Examples
@bpj
bpj / md-head2ul.pl
Last active October 31, 2021 04:21
Massage Markdown converted with Pandoc from OPML exported from Dynalist
#!/usr/bin/env perl
=head1 SYNOPSIS
pandoc -f opml -t markdown --atx-headers [PANDOC OPTIONS] input.opml \
| perl md-head2dl.pl [OPTIONS] > output.md
=head1 DESCRIPTION
Massage Markdown converted with Pandoc L<http://pandoc.org> from OPML exported from Dynalist <https://dynalist.io>.
@wxMichael
wxMichael / userChrome.css
Last active December 8, 2021 06:19
Firefox Quantum Dark Theme Fixes
:root {
--browser-background: #38383d;
}
/* Prevents New Tab White Flash */
tabbrowser tabpanels {
background-color: var(--browser-background) !important;
}
/* Dark Theme for Context Menu Top Row */
@krishpop
krishpop / export-toby.js
Last active March 21, 2024 22:12
Export Toby
// code courtesy of Toby team
chrome.storage.local.get("state", o => (
((f, t) => {
let e = document.createElement("a");
e.setAttribute("href", `data:text/plain;charset=utf-8,${encodeURIComponent(t)}`);
e.setAttribute("download", f);
e.click();
})(`TobyBackup${Date.now()}.json`, o.state)
));
@squarism
squarism / iterm2.md
Last active November 14, 2024 08:35
An iTerm2 Cheatsheet

Tabs and Windows

Function Shortcut
New Tab + T
Close Tab or Window + W (same as many mac apps)
Go to Tab + Number Key (ie: ⌘2 is 2nd tab)
Go to Split Pane by Direction + Option + Arrow Key
Cycle iTerm Windows + backtick (true of all mac apps and works with desktops/mission control)
@cuibonobo
cuibonobo / Large-app-how-to.md
Last active March 6, 2024 18:40
How to structure a large application in Flask. Taken from the Flask wiki: https://github.com/mitsuhiko/flask/wiki/Large-app-how-to

Here's an example application that uses the pattern detailed below: https://github.com/tantastik/talent-curator


This document is an attempt to describe the first step of a large project structure with flask and some basic modules:

  • SQLAlchemy
  • WTForms

Please feel free to fix and add your own tips.

@bmorton
bmorton / iTunes
Created March 14, 2011 17:56
iTunes workaround to keep it from launching with the play key
#!/usr/bin/env python
import sys, os, subprocess
launch = True
blocker = ""
apps = ["Vox", "VLC"]
ps = subprocess.Popen("/bin/ps -x", shell=True, stdout=subprocess.PIPE)