Tweet This Post

If you're a Fastmail.fm user, you can use this bookmarklet to automatically compose an email to your favorite person in Fastmail's web interface. The subject line is the title of the web page, and the body includes the link. Then just hit Cmd-Return to send.

javascript:window.location='https://www.fastmail.fm/action/compose/?to=username@domain.com&subject='+encodeURIComponent(document.title)+'&body='+encodeURIComponent(location.href)

(Make sure to replace username@domain.com with a working email address.)

Reference: Fastmail Wiki

06/30/14; 11:15:07 AM

Tweet This Post

Over the weekend I wanted to embed a video on my blog while on my iPad. The mobile YouTube site did not appear to offer an embed code, so I created a few actions to automate the process.

As an example, here is the starting URL https://m.youtube.com/watch?v=38lY-3g6mn8.

This browser bookmarklet -- I call it "TextTool Split" -- imports the URL into Drafts and triggers the "split" action:

javascript:window.location='drafts://x-callback-url/create?action=split&text='+encodeURIComponent(location.href)

The "split" URL action sends the URL to TextTool and splits the URL at the =.

texttool://x-callback-url/transform?method=split&delimiter=%3D&text=[[draft]]&x-success={{drafts://x-callback-url/create?text=[[output]]&action=line2-youtube}}

Import it here into Drafts.

The above action takes the original URL and creates a new draft:

https://m.youtube.com/watch?v

38lY-3g6mn8

It then triggers the line2-youtube action, which takes line 2, sticks it in the YouTube embed code, and saves all of that to the clipboard with the help of Launch Center Pro:

launch://clipboard?text={{<iframe width="560" height="315" src="//www.youtube.com/embed/[[line|2]]" frameborder="0" allowfullscreen></iframe>}}

Import it here into Drafts.

The result will be that the following is added to your clipboard, and you can paste it into your blog CMS:

<iframe width="560" height="315" src="//www.youtube.com/embed/38lY-3g6mn8" frameborder="0" allowfullscreen></iframe>

This action presumes that there are no additional paramaters in the URL. If your URL has something like &list= after the video ID, you will either have to manually remove that string or create an extra Drafts/TextTool action to split the results of line 2 at the & and to take line 1 of that output.

06/30/14; 09:03:42 AM

Tweet This Post

If you're a fan of Frozen, you may find this lol funny:

06/29/14; 02:04:56 PM

Tweet This Post

Happy Friends and Fargo are now working together.

The tweet below is just a headline copied from my "watched" Happy Friends tab in Fargo. It has the following attributes associated with it:

06/27/14; 12:06:35 PM

Fargo -- the CMS outliner I use to publish this site -- has the ability to publish to GitHub Pages. I have long wanted to do this. I don't want a *.smallpict.com blog, I want to publish to blog.jeffreykishner.com. I could do this back when Fargo was using Trex (its original CMS), but Dave Winer did a complete rewrite, and mapping a CNAME to a smallpict blog no longer worked. FargoPublisher is too complicated for me to set up, and I know just enough GitHub to push commits to a repository from a subdirectory in Dropbox, so I chose the latter route.

The problem I've encountered for months: I don't blog at home, and I cannot sync Dropbox at the computer where I do blog. Hence, I cannot push commits from /Dropbox/Apps/smallPicture/jkishner.github.io (where Fargo renders the HTML of my blog) to GitHub locally. I tried -- and failed -- to configure my AirPort Extreme at home to have a stable IP address so that I could SSH into my MacMini at home from another computer. That way I could sync Dropbox on my MacMini, and then push commits remotely to GitHub.

Only a few days ago, I realized that I have a "box" where I can do all this: the VPS that I rent from WiredTree. Over the past few days, I have installed GitHub, Dropbox, and the Dropbox CLI (command line interface) into the root of my VPS. It was complicated -- WiredTree had to install a parallel version of Python so that dropbox.py could work, and a sysadmin there also changed a key file to allow Dropbox to monitor all the folders in my account -- but I got it to work. Now I can blog on Fargo, ssh into my root, make sure Dropbox has synced my jkishner.github.io folder, and add/commit/push changes. I set up a CNAME redirect so that jkishner.github.io will be viewable at blog.jeffreykishner.com, and it all works.

I used to use a web service called Mover that allowed me to FTP all the files in a specific Dropbox folder to the /blog directory on jeffreykishner.com, but the GitHub solution is faster because only the updated files are uploaded -- not my entire blog -- when I want to publish.

06/26/14; 03:29:28 PM

Tweet This Post

If you get a Spotify share URL like http://open.spotify.com/album/3eAA4fvTVttgUlE43vRVMq and open it in Safari for iOS, use this bookmarklet to jump directly to that artist/album/track in the app:

javascript:window.location='spotify:'+(window.location.href);

To install, you can either set it as a bookmarklet in Safari for Mac and sync with iCloud, or do the following:

  1. Bookmark any page in Safari for iOS and call it Spotify.

  2. Go to edit bookmarks, and replace the URL of that bookmark with the javascript above.

06/19/14; 03:35:31 PM

Tweet This Post

I've written a previous post on how to schedule a text message for later with Due and Launch Center Pro. However, now that LCP's encoding grammar has simplified, I'd like to revisit the topic. First off, an action to save a text in Drafts:

drafts://x-callback-url/create?text={{launch://messaging?to=8005551212&body=[prompt]}}

Click on this link to import it onto your iOS device.

Tap on the action, enter your text message, and an encoded launch://messaging URL scheme is saved in Drafts. When you are ready to send the text message, just make links clickable and tap on the URL scheme. It will open the text message in Messages to the designated recipient (change 8005551212 to his or her cell number).

The Contact Picker

LCP now has a contact picker -- [contact] -- that will allow you to choose a contact when you start the action. I tried creating the action above by substituting the phone number with [contact] -- the action can be imported here -- but it does not work.

drafts://x-callback-url/create?text={{launch://messaging?to=[contact]&body=[prompt]}}

The problem is that the body text is not encoded, so you get something like this:

 

Screenshot by @tahewett

 

I could not figure out how to fix this, so I wrote a pretty complicated action that does do the job. (Import it here).

launch://x-callback-url/clipboard?text=[contact]&x-success={{texttool://x-callback-url/transform?text=[prompt:your message]&method=encode&clipboard=0&x-success={{drafts:///create?text={{launch://messaging?to=||clipboard||&body=[[output]]}}}}}}

How It Works

First, the action asks you to pick a contact, and the number you choose is saved to the clipboard.

Then the action prompts you to enter your message. TextTool url-encodes your message, but does not save it to the clipboard (because we need the clipboard for the contact's number).

Then the action tells Drafts to create a new draft, the launch://messaging action. The body of the message is the [output] value carried from TextTool, and the to field is the clipboard contents, which -- because it has carried over two different x-successes -- needs to use ||clipboard|| to work, as explained here:

/create URL scheme now supports a special “||clipboard||” tag within the text parameter, which will substitute the contents of the clipboard at the time the “create” URL is opened. This can be used in an x-success callback URL to allow capture of a clipboard value that changed before returning to Drafts. Note the pipe characters, not brackets. This tag is not evaluated other time, only on /create URLs when processed by Drafts.

06/19/14; 11:35:06 AM

Tweet This Post

Here is an example of an RSS feed for @newyorkcity. If you click on a link, you get to see the raw image. How I did it:

1. Use this IFTTT Recipe

Customize this IFTTT recipe with the Instagram profile you want to use, as well as the tag(s) you want. (Note: this recipe requires a Pinboard account, which requires a one-time fee.)

2. Wait Until the Recipe Has Been Triggered

Here is the newyorkcity_instagram tag for my Pinboard account. To get the RSS feed, I follow these instructions to get the following:

https://feeds.pinboard.in/rss/u:kishner/t:newyorkcity_instagram
06/18/14; 02:46:43 PM

Tweet This Post

The latest update to Launch Center Pro has made it easier to create nested lists. Previously one had to use launch://?url= but now that is no longer necessary. Here is an abridged version of my LCP action to open albums in Ecoute:

ecoute://play?terms=[[list:Artist|Eminem=[list:Album|Marshall Mathers|Recovery]|Foo Fighters=[list:Albums|The Colour and the Shape|There Is Nothing Left to Lose]|Pharrell Williams={{Pharrell Williams}}|Search=[prompt:Search]]]

When I tap on this action, it presents a list of artists (Eminem, Foo Fighters, Pharrell Williams, and "Search"). If I tap on either of the first two, I am presented with a list of albums, and when I tap on the album name, that album auto-plays in Ecoute. If I tap on Pharrell Williams, G I R L automatically plays because I only have one album by him in my library. And if I tap on Search I am presented with a prompt, and if my query matches something in my music library, then it starts playing. (Thanks to Eric Pramono @epramono for help encoding this last part.)

The key to this nested list is that the first list is surrounded by double brackets and the embedded lists are only surrounded by single brackets. Two brackets means don't encode this. Because the first list is not encoded, I have to encode Pharrell Williams in double curly brackets since his name does not included an embedded list. And the search prompt only needs single brackets because they encode the prompt text.

The Spotify URL scheme is a bit more complicated. Here is an abridged version of my Spotify action:

spotify:[[list:Pick a List|Ali Farka Touré={{http://open.spotify.com/artist/3mNygoyrEKLgo6sx0MzwOL}}|King's X=[list:|Xv=http://open.spotify.com/album/792TsZibmmEiOCL2rEoJvm|Please Come Home....Mr. Bulbous=http://open.spotify.com/album/2ZyMISUxP7MLzxZCZLHEHJ]|Yes=[list:|Fragile=http://open.spotify.com/album/4X6gq5bgpGXcHINlFWzriM|Relayer=http://open.spotify.com/album/6MK9yp7hFeOLeR7F1hsBp6]]]

When I click on this action I would be presented with Ali Farka Touré, King's X, and Yes. Following the pattern above, if I don't have an embedded list for an artist, I just encode that value with double curly brackets. Otherwise I just use single brackets around the embedded list.

The URL scheme for Spotify is spotify:SPOTIFY_URL. You can get the Spotify URL from the app (in the share settings) or via a google search. I've even written a search tool using their API here.

How to Manage These Actions

One of the major downsides of LCP is that it's difficult to edit very long actions in the app's editor. However, there is a way around this. Import this action or just create a new action called Import and enter this string:

launch://import?url=[dropbox-text:ACTION.txt]

Then keep your music actions in their own text files in Dropbox. For example, I currently have my unabridged Spotify action as a text file called spotify.txt in the root of my Dropbox folder. I then just use the following action to import it:

 launch://import?url=[dropbox-text:spotify.txt]

LCP will import that text file, and ask you if you want to add it, just like if you were to use one of the importable actions at launchcenterpro.com. This way, you can make your edits in any Dropbox text editor instead of within the app itself.

06/16/14; 11:57:07 AM

Tweet This Post

Tweetbot has a list of URL schemes, the most recent of which is one to jump immediately to a Twitter list. I have never used it until now because I never knew how to find a list's ID. But now that I've figured it out, I'd like to share it with you.

The full scheme is

tweetbot://<screenname>/list/<list_id>?callback_url=<url> 

but you don't need to include the ? parameter unless you want to go somewhere other than your most recent timeline view in the app.

Let's say I want to view my ios Twitter list. To get the list ID, I view the source of the web page and search for data-list-id. In this example, the source code includes data-list-id="79393622". I take that value and put it in the URL scheme:

tweetbot://kishner/list/79393622

If I include this as an action in Launch Center Pro, then clicking on it will bring me right to that list.

If I have a preferred app I want to go to after I click the Cancel button, I can include the callback_url parameter, which is an encoded URL. If I want to go to Launch Center Pro:

tweetbot://kishner/list/79393622?callback_url=launch://

If I want to go to an actual website like google.com instead:

tweetbot://kishner/list/79393622?callback_url=http%3A%2F%2Fgoogle.com

Enjoy!

06/16/14; 09:21:52 AM

Last built: Tue, Mar 31, 2015 at 2:05 PM

By Jeffrey Kishner, Monday, June 16, 2014 at 9:21 AM.