New Sublime Text Themes: am​Coder and Minimal Sublime Text

amCoder

So many themes and color schemes

These aren’t exactly new, but I’ve been around the Sublime Text theme scene for a while and I’d never seen these two. So, here you go!

amCoder

amCoder describes itself as a “Hyperminimal UI Theme for Sublime Text 2/3 with Love of Monokai.” It’s based on Spacegray, and is optimized for Monokai.

amCoder can be installed via Package Control and can also be found on GitHub. Here’s a screenshot of the amCoder Sublime Text theme:
amCoder

Minimal Sublime Text

Minimal Sublime Text is a flat version of the default Sublime Text theme. That’s probably why I like it so much.

It also comes with a dark sidebar version and can be installed via Package Control. Imagine that. :) Minimal Sublime Text is available on Github as well. A screenshot of Minimal Sublime Text is below:
minimal

Here’s some other recent posts about Sublime Text themes:

  1. Brogrammer Theme
  2. Predawn
  3. Spacefunk
  4. Flatland
  5. A bunch of others

Responsive HTML Tables

stack

HTML tables have fallen out of favor over the past few years. People seem to use grids where a plain HTML table would really work much better. This is especially true when displaying data, like you’d find in a spreadsheet.

Enter TableSaw, a group of plugins for responsive tables. There are various modes, the featured image for this post is a preview of the Stack mode.

There are many other modes to choose from, too.

To get you started quickly, there’s a Stack-Only TableSaw, it’s barebones and doesn’t include the other modes. Here’s a demo of the Stack-Only TableSaw.

For usage instructions for the full TableSaw, look towards the bottom of the README on GitHub. You basically are just including a few CSS and JavaScript files.

Add Open Graph Protocol Markup to Any WordPress Theme

og

Rich objects in a social graphs

When you share a link on Facebook, an image from the link is shown, usually. Sometimes, no image is displayed, as if Facebook couldn’t find a suitable image at the URL.

Why?

Adding Open Graph protocol tags to your site will ensure that Facebook knows which image to use when someone shares a page on your website. Open Graph markup is similar to schema.org markup. Both allow you to define values for certain aspects of your website, as seen by other sites like Facebook, Twitter, and many other social media sites.

How?

There’s a couple of ways we can do this. You can use a plugin, like Open Graph Protocol Framework, or you can add Open Graph markup to your WordPress theme manually.

We’ll be covering how to add Open Graph markup to your theme manually. Especially useful for theme developers who want to build Open Graph protocol support into their themes.

The markup we’ll be adding can be seen in this GitHub gist:

Most of that should be pretty self-explanatory.

The og:type property is the only tag that needs explanation, as there’s only certain values that are valid. Most of the time, you’ll probably be setting the og:type property to article or website. A list of other Open Graph protocol object types can be found at the Open Graph protocol site.

The Code

Every Open Graph property will be set on-the-fly, depending on which post or page is being viewed or shared. To add the necessary markup, we need to use the add_action WordPress function inside your theme’s functions.php file. Here’s how I’ve been handing it:

Comments are open below, feel free to ask questions or tell me how wrong I am on one point or another. :)

How-To: Install lolcommits On Ubuntu

lolcommits

Lolcat-style photos as you commit

I’ve always had problems installing lolcommits on Xubuntu and other Ubuntu-based Linux distributions.

The installation instructions are very simple. Only requiring you to run two commands, sudo apt-get install mplayer imagemagick libmagickwand-dev and then sudo gem install lolcommits (need sudo for linux). Pretty simple.

The gem install lolcommits command is where things usually go bad for me. I typically see something like this:

To fix this, you need to install a newer ruby-dev package:

You can now try to install the lolcommits gem again. It’ll actually install this time:

A GitHub user documented this solution in issue #54. Another user suggests that the installation guide should be updated to make a note of this, but I haven’t seen it noted anywhere but in issue #54.

It’d sure save me a bit of time if it was noted somewhere, that’s partly why I’m writing this post.

After you’ve got lolocommits installed, see the README on GitHub for usage instructions and examples.

I usually run lolcommits --enable --delay=2 --fork when enabling lolcommits. That will capture a photo in a forked process, after a 2 second delay. I like this method because you’re not left waiting for the photo before being able to type into your terminal again.

Lolcommits is kinda cool, but not really useful in a practical sense. I do use it pretty much everywhere though, and have the default storage location linked to Copy. That way all my images are in the same place, no matter which machine I’m using at home.

If nothing else, it’s something kinda neat to be able to offer to your clients.

tyler-hat-lolcommits

I no longer smoke. ;)

Remove SSH Login Message After DigitalOcean WordPress One-Click Install

do

After creating a new Droplet using the pre-built WordPress image provided by DigitalOcean, you’re presented with a very helpful message after logging in via SSH:

To finish installing WordPress, navigate to your droplet’s IP: http://xxx.xxx.xxx.xxx
Make sure to specify hostname from DO panel to your droplet before creating it (for example: ‘blog.mydomain.com’ or ‘myblog.com’)
This will create necessary Apache configs based on hostname and Apache will respond based on hostname.
Server will also respond to its IP address, so if you finish installation from http://IP then
you will need to change hostname from WordPress Settings later (from http://IP to http://hostname)

It’s a really helpful message, especially if you’re new to DigitalOcean and even more so if you’re new to hosting stuff on your own (ie: unmanaged hosting). However, the message isn’t really helpful after the first login, maybe two logins.

There’s a great article on how to get setup after using the One-Click WordPress install, but removing the message is never mentioned.

It’s just a message of the day, the configuration for which can be found in /etc/motd. Delete line 2, and you should be good to go.