OS theme
Dark theme
Light theme
My iPhone battery
My iPhone Wi-Fi
Current motion
Click for current location
๐Ÿ‘ˆ๐Ÿผ ๐Ÿ•ธ๐Ÿ’ ๐Ÿ‘‰๐Ÿผ
Skip to main content

August 13

Over the years...

 

Channeling my grandmother, Sarah Lincoln, โ€œIโ€™d rather just open my mouth and let the sun shine in!โ€

 

Back at the Hollywood Bowl for the second time this week. SoCal summers โค๏ธ

 
 

Checked into Ralphs

Picking up scrip

 
 
 
 
 
 

Checked into Mendocino Farms

Mendocino Farms

Sammy with Kris!

 
 

Proud to be at @DreamHost, where we stand up for what's right.

https://www.dreamhost.com/blog/we-fight-for-the-users/

 

Congratulations to @canary on releasing some awesome new features for users like me. Big fan!

https://twitter.com/canary/status/897097198479048704

 

I created a plugin for @withknown for posting recipes. https://github.com/cleverdevil/Known-Recipes

 

Recipe: Fresh Whisky Sours

Ingredients

  • 1 cup bourbon whiskey
  • 1/2 cup freshly squeezed lemon juice
  • 1/2 cup freshly squeezed lime juice
  • 1/2 cup freshly squeezed orange juice
  • 2/3 cup sugar syrup
  • Ice cubes

Takes . Serves four.

Combine the whiskey, lemon juice, lime juice, orange juice and syrup. Fill a cocktail shaker halfway with ice and pour in the drink mix 2/3 full. Shake for 15 seconds and pour into glasses.

Note: To make the sugar syrup, bring 1 cup of water and 1 cup of sugar to a boil, and simmer until the sugar is completely dissolved. Chill before using.

 

Documents Confirm Apple is Building a Self-Driving Car

Will they go the Tesla Motors route, and use age-old technology and materials, but complement them with innovative software? I sort of hope not. I'd prefer to see them take the BMW route, and use innovative materials and processes, along with great software. Only, you know, not make their cars as hideous as the BMW i3, which is by all accounts, one of the ugliest vehicles ever created.

Exciting times in motoring.

Update (August 21, 2:15 PM PT): The plot thickens!

 

Yes: I'm headed to OpenStack Trove Day in San Jose in a few weeks. Catch up with me there!

 
 

Currently, in Seattle...

Currently, in Seattle...

Manhattan and Fried Chicken Livers at Radiator Whiskey.

 

Publishing Markdown to Micropub Endpoints with Python

2 min read

Youโ€™re probably sick of my posts about Micropub by this point, so Iโ€™ll make this my last for a while. Maybe.

Iโ€™m up in Seattle this week on business, and the airplane ride from Los Angeles gave me a chance to play around a bit more with Micropub. I whipped up a quick script that allows for quickly publishing Markdown-formatted content to a Micropub endpoint.

This very post is published with the script! Micropub inception! Take a look:

#!/usr/bin/env python

'''
A script for quickly publishing blog posts to a Micropub endpoint. To use
this script, first ensure that you have installed:

    PyYAML
    requests
    markdown

You will also need to set the following environment variables:

    INDIEAUTH_TOKEN
    MICROPUB_ENDPOINT

Run the script, and pass it the path to a Markdown-formatted file. YAML
formatted front matter can be provided with Micropub arguments such as
`name`, `published`, and `slug`.
'''

import sys, os, yaml
import requests, markdown

# configuration
data = {}
token = os.environ.get('INDIEAUTH_TOKEN')
endpoint = os.environ.get('MICROPUB_ENDPOINT')

# make sure the user has provided adequate information
if not token or not endpoint:
    print 'INDIEAUTH_TOKEN & MICROPUB_ENDPOINT environment variables not set.'
    sys.exit(0)

if len(sys.argv) < 2:
    print 'Usage:'
    print '    blogit <path to markdown file>'
    sys.exit(0)

# read in the content
filename = sys.argv[1]
raw_content = open(filename, 'rb').read()

# check for front matter
if raw_content.startswith('---'):

    # parse out the front matter from the raw content
    _, front_matter, raw_content = raw_content.split('---', 2)

    # parse the frontmatter
    data = yaml.load(front_matter)

# render markdown
data['content'] = markdown.markdown(raw_content, extensions=[
    'markdown.extensions.codehilite',
    'markdown.extensions.extra',
    'markdown.extensions.smarty'
])

# populate remaining details
data['access_token'] = token
if 'h' not in data:
    data['h'] = 'entry'

# create the post
result = requests.post(endpoint, data=data)

# check the result
if result.status_code not in (200, 201):
    print 'Failed to publish post with status code: %d' % result.status_code
    sys.exit(1)

print 'Published successfully.'

Youโ€™ll note that it supports some Markdown extras, including code highlighting with Pygments, and several other extras.

Feedback is, of course, welcome. On my flight home, I plan on polishing the script up a bit, making it easy to install, and adding a few options.

 

NYTimes: Republican Hypocrisy on Iran

The Editorial Board at the New York Times is fed up with how the Republican party is responding to President Obamaโ€™s proposed deal with Iran โ€“ a difficult to negotiate and exceedingly important deal that could be torpedoed solely because the GOP doesnโ€™t like the President.

Even more frustrating is the hypocrisy at play.

Policy considerations aside, what is most striking about the demagoguery is how ahistorical, if not downright hypocritical, it is. Negotiating with adversaries to advance a more stable world has long been a necessity, and Republican presidents have been among its most eager practitioners.

Obama and Kerry have worked tirelessly to come to the same type of agreement that Nixon and Reagan made during their tenures. A deal which could save lives and is primarily about preventing war.

 

Micropub and the IndieWeb

2 min read

It's been years since I last maintained a personal website. Why? Sadly, because of the rise of social media, and content walled-gardens. A few weeks ago, I discovered Known, a new, open source CMS. Known acts as more than just a CMS, enabling users to create a single site that captures all of their content from social media and walled-gardens like Twitter, Facebook, and Instagram.

Known was born out of the IndieWeb movement, which focuses on resurrecting the web of the past, where your content is owned by you, not by an ad-driven corporation. The IndieWeb crew have developed a series of standards and specifications to encourage what they call POSSE, or Publish on your Own Site, Syndicate Elsewhere.

Surprise, It's Markdown!

This site that you are reading right now is created with Known, and fully supports IndieWeb standards like Micropub. In fact, this very post was created in Editorial for iOS and published via Micropub to this site via two workflows.

The Future is Open and Bright

I am thoroughly enjoying being able to microblog, create long form posts, share photos, and otherwise participate in the open web again, while maintaining my ownership over my own content in a single, canonical, self-managed site on my own domain.

The future of the open web is looking up!