Skip to content

Instantly share code, notes, and snippets.

@jackbaty
jackbaty / gist:1973678
Created March 4, 2012 16:07 — forked from mlopes/gist:1852550
Convert wordpress style caption tags to octopress image tags
#!/usr/bin/perl
use strict;
my $script_name = $ARGV[0];
my $file_contents = "";
while(<>) {
if($_ =~ /\[caption.*/) {
my %imageData;
@jackbaty
jackbaty / README.md
Created May 25, 2021 09:05 — forked from mikepqr/README.md
Make printouts from Firefox Reader mode look like dang NYRB artices

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 / titleUrlMarkdownClip.js
Last active August 7, 2021 10:48 — 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)
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;