all posts tagged 'timbornholdt.com'

Adding tagging to timbornholdt.com

originally shared here on

I just released a feature to this site where blog posts can now be tagged with any number of tags.

You can then read all the posts that are tagged as confidence or music or programming or whatever.

I was extremely inspired by kottke.org's recent redesign. The idea of turning your blog into your own social media stream-looking thing strikes me as one of those design decisions that feels revolutionary and obvious at the same time. I will no doubt try to do something similar to this site right here.

But as I think through the best place to start, I'm resisting my urge to just blanket redesign the site without a plan. And the first step of that plan is to do the tedious work of going through my archives and adding tags to the old posts.

Tags aren't exactly a revolutionary new feature. It took me about a half hour to implement the basics, and then another day or so of tweaking the process of adding them to each post so I can do it quickly.

The reason I wanted to share this as a post is because one unintended consequence of going through this process was [pause for sarcastic and dramatic effect] ... anxiety!

Because of course the creation of a a feature for my site that is read by an exceptionally low number of people must result in getting way into my head about it.

Yesterday, I spent about an hour going through my old posts and adding some tags to them.

As I got deeper into the archives, I kept thinking of tags that would've been great to add to posts I had already added tags earlier.

I found myself getting mad at myself for not being optimized up front and just having a tag list to choose from.

Well guess what, Tim? There’s no way you’ll know what tags you want to add until you’ve added all the tags!

Just do your best, man. Even getting half way is an amazing leap forward. Just keep moving forward.

It's proving to be surprisingly hard for me to not beat myself up over this tag system, which again, is supposed to be fun, you goober!

Here's the best case scenario from doing all this work: maybe these tags will help me articulate the overall themes I cover on my site, to identify the topics I’ve been interested in throughout the last fifteen-ish years.

Here's the worst case scenario from doing all this work: complete and total indifference from the universe.

Note to self: just enjoy getting a chance to go through the clutter of your site and clean it up. It’s fun! Add whatever tags you think will help, and if you get an idea about a better tag later, go back and look it up then!

As you can see, I'm still working on not letting anxiety cripple me from starting and completing a project.

Why am I even stressing about this?

Just go have some fun with your tag thing.

It makes you happy.

That should be enough.

Tags for this post:

timbornholdt.com Strikes Back

originally shared here on

A few weeks ago, I got an email from Google saying that I had an "unusual number of 404 errors" on my site. I looked into it, and a very helpful script kiddy exploited my Wordpress site and took over the admin account.

It didn't look like there was much in there in terms of damage done, but they basically changed my admin password, bricked my template, and moved on.

After years of neglecting this blog (yet again) and after years of dealing with an annoying CMS, I had the same thought that every web developer has: "Nuts to this, I'm just gonna build this site myself from scratch."

So here we are: timbornholdt.com version whatever!

After reading back from my old posts in 2012, I realized that I really should start blogging again. I really enjoy seeing how much has changed in the past 6 years, and I know that if I start blogging about my life now that I'll look back in another 6 years and have the same feelings.

So without further ado, welcome to the blog, and we'll see you in another 6 years!

Tags for this post:

How to detect and replace YouTube links by extending the Redcarpet gem

originally shared here on

As I'll explain in a future post, I had an old Wordpress blog that I got sick of maintaining and updating, so I did what any red-blooded developer would do: build my own blog engine.

In doing so, however, I needed to import all my old posts from Wordpress over to my own Rails form. This worked nearly flawlessly, with the exception of my YouTube videos, which looked something like this (without the space inside the tag):

[youtube]nFZZxOHHZlo[/youtube ]

Because I am using the Redcarpet gem, I thought I'd extend its parsing capabilities to detect anything like this and wrap it in a responsive frame.

Here's how I did it (with extreme thanks to this SO post):

Step 1: Create a folder called app/services, and then create a file called custom_markdown.rb:

class CustomMarkdown < Redcarpet::Render::HTML
  def preprocess(text)
    format_youtube(text)
  end

  def format_youtube(text)
    text.gsub! /\[youtube](.*?)\[\/youtube]/ do
      "<div class='embed-container'><iframe src='https://www.youtube.com/embed/#{$1}' frameborder='0' allowfullscreen></iframe></div>"
    end
    text
  end

end

This code will perform a regular expression to find anything wrapped in [youtube] tags and replace it with a <div> that we can now style with CSS.

Step 2: Add the following SCSS somewhere in your project where it makes sense:

.embed-container { 
  position: relative; 
  padding-bottom: 56.25%; 
  height: 0; 
  overflow: hidden; 
  max-width: 100%; 
  iframe, object, embed { 
    position: absolute; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
  }
} 

Step 3: Use the custom parser when including Redcarpet in your project:

require './app/services/custom_markdown.rb' # This was necessary for me, might not be necessary for you
@blogs = Blog.all.order("published_at desc")
renderer = CustomMarkdown.new()
@markdown = Redcarpet::Markdown.new(renderer, extensions = {})

Now, anywhere you use those [youtube] tags, you'll get this fancy rendering instead:


New Front Page Design

originally shared here on

It was around this same time last year that I updated timbornholdt.com, and I figured I was due for a bit of a redesign as well.

This time, I went a bit more simplistic: just one page with a short biography and links to some choice projects.

I'd love to hear what you think. Holler at me on Twitter.

Tags for this post:

Welcome

originally shared here on

I've had the motivation for the last few months now to start my own blog, and after listening to this week's superb episode of The Talk Show, I decided it's time to just get it going.

This blog will be a smorgasbord of links, long-form posts and shameless, shameless self-promotion. I'll likely link to lots of stuff about Apple, photography, podcasting, running and other general geeky topics. And don't be surprised if I change the design six thousand times and leave this site stagnant for months on end.

So, without further ado, here we go.

Tags for this post: