Skip to content

Instantly share code, notes, and snippets.

View jstrieb's full-sized avatar

Jacob Strieb jstrieb

View GitHub Profile
@jstrieb
jstrieb / details-stylesheet-test.md
Created February 18, 2021 02:26
GitHub Stylesheet <details> Problem Demo

This is a (minor) bug report.

On github.com, with the default GitHub stylesheet, the <details> tag only has cursor: pointer if a <summary> tag is included explicitly. If there is no <summary> tag, the cursor does not indicate that the dropdown is clickable. Here is an example of the incorrect style:

This is a test

@jstrieb
jstrieb / details.md
Created August 9, 2020 22:57
Demonstration of the <details> tag for collapsible sections in GitHub Markdown
Click here for example HTML/Markdown.
echo "It is possible to include Markdown within HTML tags."
// I hate the automatically highlighted text in Chrome using the #targetText attribute in the URL hash
// This bookmarklet gets rid of the hash and refreshes the page to make the highlighted text disappear
javascript:window.location.replace(window.location.href.substr(0, window.location.href.indexOf('#')));
@jstrieb
jstrieb / wsj_paywall_bypass.js
Last active September 17, 2019 15:09
Bookmarklet to bypass WSJ (and some other) paywalls by redirecting through Facebook
// To install, highlight the line below and drag it to your bookmarks bar
javascript:document.location = "https://l.messenger.com/l.php?u=" + document.location.href.replace(/\?.*/, "").replace(/\//g, "%2F").replace(/:/g, "%3A")
// To bypass WSJ (and some other) paywalls, navigate to the article in incognito mode, and click the bookmarklet
@jstrieb
jstrieb / google_account.js
Created March 6, 2019 22:33
Bookmarklet to choose a specific Google account to use with the current service (specifically, works for Google Tasks which does not have an account selection dialog https://mail.google.com/tasks/canvas?pli=1)
// To install, highlight the line below and drag it to your bookmarks bar
javascript:window.location = "https://accounts.google.com/SignOutOptions?continue=" + window.location
// To use this extension, simply visit a Google service and click the bookmarklet to select an account to use with that service
@jstrieb
jstrieb / multi-map.py
Created December 29, 2018 20:25
Demonstration of Python multiprocessing map
import time
from multiprocessing.dummy import Pool
with Pool() as p:
start = time.time()
print("Starting fast map...", end="")
p.map(lambda _: time.sleep(.01), range(1000))
print("Took %0.2f seconds\n" % (time.time() - start))
@jstrieb
jstrieb / hide.js
Last active June 18, 2018 20:28
Bookmarklet to hide the "Hot Network Questions" on Stack Overflow and related sites
// To install, highlight the line below and drag it to your bookmarks bar
javascript:(function(){document.getElementById("hot-network-questions").style.display = "none";})();
// To use this extension, simply visit a Stack Exchange site with Hot Network Questions and press the bookmarklet to hide them