This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% for post in site.posts limit: 20 %} | |
<entry> | |
{% if post.external-url %} | |
<title type="html"><![CDATA[{{ post.title | cdata_escape }}]]></title><!-- add in a glyph or [link-post] here so people know where they're ending up --> | |
<link href="{{ post.external-url }}"/> | |
{% else %} | |
<title type="html"><![CDATA[{{ post.title | cdata_escape }}]]></title> | |
<link href="{{ site.url }}{{ post.url }}"/> | |
{% endif%} | |
<updated>{{ post.date | date_to_xmlschema }}</updated> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% unless page.no_header %} | |
<header> | |
{% if index %} | |
{% if post.external-url %}<!-- Assumes you use 'external-url:' in your YAML. Change to whatever you like as long as they match. --> | |
<h1 class="entry-title"><a href="{{ post.external-url }}">{% if site.titlecase %}{{ post.title | titlecase }}<!-- Glyph or label that this is a link post goes here -->{% else %}{{ post.title }}{% endif %}</a></h1> | |
{% else %} | |
<h1 class="entry-title"><a href="{{ root_url }}{{ post.url }}">{% if site.titlecase %}{{ post.title | titlecase }}{% else %}{{ post.title }}{% endif %}</a></h1> | |
{% endif %} | |
{% else %} | |
{% if page.external-url %}<!-- The above code changes the header on your index pages (list of posts). Now this will change the header on actual post pages so the header will still link out to an external url. --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on replaceCommasInStringWithHTMLEntity(theTitle) | |
set rubyCommand to quote & "puts " & "'" & theTitle & "'" & ".gsub( /,/, ',' )" & quote | |
set strippedTitle to do shell script "ruby -e " & rubyCommand | |
return strippedTitle | |
end replaceCommasInStringWithHTMLEntity | |
on stripUTMFromURL(urlToStrip) | |
set rubyCommand to quote & "puts " & "'" & urlToStrip & "'" & ".gsub( /\\?utm.*$/, '' )" & quote | |
set strippedURL to do shell script "ruby -e " & rubyCommand | |
return strippedURL |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tell application "Safari" to set ingredientlist to text of front document | |
set my text item delimiters to " | |
Ingredients" | |
set ingredientlist to text item 2 of ingredientlist | |
set my text item delimiters to " | |
Procedures" | |
set ingredientlist to text item 1 of ingredientlist | |
set l to paragraphs of ingredientlist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tell application "Safari" to set recipeurl to URL of front document | |
set ingredients to (do shell script "curl http://recipedistiller.com/recipe/classify/?recipeurl=" & recipeurl & " | textutil -convert txt -stdin -stdout | grep '.' | sed 's/ • DELETE //g'") | |
set my text item delimiters to "VIEW RECIPE" | |
set ingredients to text item 2 of ingredients | |
set my text item delimiters to "©" | |
set ingredients to text item 1 of ingredients | |
set l to paragraphs of ingredients |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- I can't take credit for this one. Justin Lancy (@Veritrope) tossed it my way in a tweet. | |
-- http://twitter.com/Veritrope/status/268746890177282049 | |
tell application "TextExpander" | |
set my_Snip to snippet "ttime" in group "TextExpander Snippets" | |
expand snippet my_Snip | |
end tell |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(* | |
Apple Mail to Markdown Formatted Text For Day One Importauto | |
Adapted from 'Apple Mail -- Text File Exporter w/ Basic Header Info' by Justin Lancy: | |
http://veritrope.com/code/apple-mail-export-to-text-file-w-basic-header-info | |
Adapted from the original script by Hans Erik Hazelhorst | |
http://veritrope.com/code/export-apple-mail-messages-and-notes-to-text-files | |
*) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(* | |
Apple Mail to Markdown Formatted Day One Entry | |
!!! IMPORTANT !!! | |
Requires the Day One Command Line Interface. Download and install from here: | |
http://dayoneapp.com/tools/ | |
Adapted from 'Apple Mail -- Text File Exporter w/ Basic Header Info' by Justin Lancy: | |
http://veritrope.com/code/apple-mail-export-to-text-file-w-basic-header-info |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Use this AppleScript to Download any of the master lists maintained my Mike D'Angelo: | |
-- http://www.panix.com/~dangelo/ | |
-- | |
-- Script will only work if you visit one of his list pages in Safari then run it from Script Editor. | |
-- Will still run on other sites but will output nonsense. | |
-- | |
-- Saves a .txt that will open in any text editor or OmniOutliner, but won't open directly in TaskPaper. | |
-- Simply copy and paste the resulting text into a new TaskPaper document if you prefer. | |
tell application "Safari" to set listurl to URL of front document |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Get current song, album and artist from iTunes. | |
# | |
# Intended for use with Smile Software's TextExpander: | |
# http://www.smilesoftware.com/TextExpander/index.html | |
# | |
# Set up as a snippet to turn current track into text. A nice way to spin your wheels while writing/coding/contemplating the shape of the universe. | |
tell application "iTunes" | |
set current_song to the name of current track | |
set current_artist to the artist of current track |
OlderNewer