Skip to content

Instantly share code, notes, and snippets.

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Diagram</title>
<style>
body {
margin: 0;
padding: 0;
font-family: sans-serif;
@WFreelandEcon
WFreelandEcon / toggleComments.js
Created January 31, 2018 21:02 — forked from RobTrew/toggleComments.js
Toggle selected comments in OS X 10.10 Script Editor
// ROBIN TREW 2015 MIT License
// OSX 10.10 SCRIPT EDITOR – TOGGLE COMMENTS
// Add remove '// ' from before printing characters
// Depends on a library .scpt being saved at ~/Library/Script Libraries/DraftsSE.scpt
// See: See: http://support.foldingtext.com/t/writing-scripts-which-run-on-both-foldingtext-and-ios-drafts-4/652/7
// INCLUDE LIBRARY OF IOS DRAFTS-COMPATIBLE EDITOR FUNCTIONS:
@WFreelandEcon
WFreelandEcon / DraftsFunctions_ScriptEditor.js
Created January 31, 2018 21:01 — forked from RobTrew/DraftsFunctions_ScriptEditor.js
OS X 10.10 (Yosemite) definitions of the basic script editing functions used in iOS Drafts 4
// Ver 0.4 Rob Trew
// Library for using OSX Yosemite Script Editor scripts
// written in an idiom compatible with FoldingText, Drafts, 1Writer, TextWell
// In iOS Drafts 4 scripts, the header is simply:
// var drafts = this;
// For headers for FoldingText and other editors, see:
// See: http://support.foldingtext.com/t/writing-scripts-which-run-on-both-foldingtext-and-ios-drafts-4/652/7
// Call functions, after this header, with the prefix:
// drafts.
@WFreelandEcon
WFreelandEcon / replace_words.js
Created January 31, 2018 09:10 — forked from mrcoles/replace_words.js
Replace all instances of one word with another in a web page
// ### Replace words in document
//
// Update all instances of `fromWord` to `toWord` within the text
// in the current document.
//
function replaceWordsInDocument(fromWord, toWord) {
if (/\s/.test(fromWord)) {
throw new Error('You must enter a single word without whitespace');
}
@WFreelandEcon
WFreelandEcon / webexcursions.rb
Created January 24, 2018 23:48 — forked from ttscoff/webexcursions.rb
A script for gathering new Pinboard links with a certain tag and generating Markdown/Jekyll posts when enough are collected.
#!/usr/bin/ruby
# WebExcursions, a script for gathering new Pinboard links with a certain tag
# and generating Markdown/Jekyll posts when enough are collected.
# Brett Terpstra 2013
#
# -f to force writing out current bookmarks to file regardless of count
%w[fileutils set net/https zlib rexml/document time base64 uri cgi stringio].each do |filename|
require filename
end
@WFreelandEcon
WFreelandEcon / LICENSE.txt
Created January 19, 2018 15:54 — forked from kjaymiller/text_to_things3.scptd
AppleScript Import Text to Things3
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit
@WFreelandEcon
WFreelandEcon / url2mdlink.py
Created January 19, 2018 02:04 — forked from kspeeckaert/url2mdlink.py
Create a Markdown link from a URL, using the page's title as link description
//
// Regular Expression for URL validation
//
// Author: Diego Perini
// Updated: 2010/12/05
// License: MIT
//
// Copyright (c) 2010-2013 Diego Perini (http://www.iport.it)
//
// Permission is hereby granted, free of charge, to any person
@WFreelandEcon
WFreelandEcon / gist:c2084023d9f8ab26e91254169ac0a78b
Created September 1, 2017 15:52 — forked from ddeville/gist:dc6ba4346604ab4d6b65
Present the bookmark creation window in Spillo and populate it with the content from the frontmost tab in Safari
tell application "Safari"
set current_tab to current tab of front window
set tab_title to name of current_tab
set tab_address to URL of current_tab
tell application "Spillo"
show create bookmark panel with properties {url:tab_address, title:tab_title}
end tell
end tell
@WFreelandEcon
WFreelandEcon / make_bookmarklet.pl
Created August 12, 2017 04:11 — forked from gruber/make_bookmarklet.pl
JavaScript Bookmarklet Builder
#!/usr/bin/env perl
#
# http://daringfireball.net/2007/03/javascript_bookmarklet_builder
use strict;
use warnings;
use URI::Escape qw(uri_escape_utf8);
use open IO => ":utf8", # UTF8 by default
":std"; # Apply to STDIN/STDOUT/STDERR