Skip to content

Instantly share code, notes, and snippets.

@jackbaty
jackbaty / titleUrlMarkdownClip.js
Last active Aug 7, 2021 — forked from idelem/titleUrlMarkdownClip.js
Bookmarklet to copy current page title and url in various formats to clipboard, like [title](url) - (Org mode, TiddlyWiki, and Markdown)
View titleUrlMarkdownClip.js
javascript:(function() {
function copyToClipboard(text) {
if (window.clipboardData && window.clipboardData.setData) {
/*IE specific code path to prevent textarea being shown while dialog is visible.*/
return clipboardData.setData("Text", text);
} else if (document.queryCommandSupported && document.queryCommandSupported("copy")) {
var textarea = document.createElement("textarea");
textarea.textContent = text;
@jackbaty
jackbaty / README.md
Created May 25, 2021 — forked from mikepqr/README.md
Make printouts from Firefox Reader mode look like dang NYRB artices
View README.md

To install in Firefox:

  1. If it doesn't already exist, create a folder called chrome in your profile folder. The easiest way to find your profile folder is in about:profiles (there's a "Show in Finder" link for the folder on macOS). Be sure to choose the right profile is you have more than one.

  2. Put userContent.css above in the chrome folder you just created.

  3. Load about:config in Firefox then set toolkit.legacyUserProfileCustomizations.stylesheets to true.

  4. Quit and reopen Firefox, just for luck.

@jackbaty
jackbaty / gist:1973678
Created Mar 4, 2012 — forked from mlopes/gist:1852550
Convert wordpress style caption tags to octopress image tags
View gist:1973678
#!/usr/bin/perl
use strict;
my $script_name = $ARGV[0];
my $file_contents = "";
while(<>) {
if($_ =~ /\[caption.*/) {
my %imageData;