Skip to content

Instantly share code, notes, and snippets.

@timgavin
timgavin / alfred-new-blog-for-jekyll.sh
Last active October 10, 2020 00:28
Alfred workflow for creating a new Jekyll blog post
#!/bin/bash
# In Alfred, create a new Blank Workflow and add a Keyword Input (Argument Required/uncheck With Space), mine is "new blog:" (without the quotes)
# Add a Run Script Action and make sure /bin/bash is selected in the Language dropdown
# Copy this Gist into the Run Script action (replacing the default text)
# Connect the Keyword action to the Run Script action
# Open an Alfred prompt and enter "new blog:My New Blog" without the quotes
# Watch the magic happen...
import Foundation
extension String
{
var length: Int {
get {
return countElements(self)
}
}