short posts

Last night, I decided to finally take the plunge and buy a short vanity domain I had been considering for several years (2b1.me), only to find it had been purchased just 48 hours beforehand, at the very registrar I was planning to use (Porkbun). Continue reading post "#2656"


WordPress code plugin, a quick solution

I'm slowly copying the markdown versions of my posts after my recent move of this blog. It really is tedious, and I don't think I'll finish anytime soon, so in the meantime I created a plugin to output the [ code] shortcode that wordpress.com put in my post export in the same way that markdown does. This is the first plugin and shortcode I've created in a long while, but it was relatively quick to do working off of my posts on plugins and shortcodes. The biggest time consumer was figuring out how to deal with whitespace issues. Apparently, WordPress sometimes will add <p> and <br /> to shortcode content. Also, there were leading and trailing line breaks adding unnecessary space. My quick solution:

Continue reading post "WordPress code plugin, a quick solution"

Finding short TLD's

I've been looking for a short domain to potentially use for permashortlinks. For a domain to be usefully short, it must have both a short TLD and short SLD. Having three characters each would make for seven total characters (including the period) for the domain. Much more than that and it starts to lose its usefulness. There are no one character TLD's (though they'd be great for permashortlinks). Two character TLD's are reserved for country codes. I'm a bit reluctant to use a code for a country I don't live in, and the one I do disallows whois privacy. I'm a bit reluctant to decide that my address, phone number and email address will be "perma"nently available for all to see (assuming I keep the permanent promise of of permashortlinks). So three characters have been where I've been doing most of my looking.

There are a number of good lists of available TLD's. Indiewebcamp has a list of options with a brief blurb on their fitness and possible problems. It only has country code domains though. United Domains has a list with current TLD's and their prices plus soon to be available TLD's. It has a page for each with some information about the TLD and marketing-speak thoughts on uses. Name.com has a list with per-TLD pages as well that are often more brief. It's hard to parse these lists to find just the short ones though.

I found two plain-text lists of TLD's (IANA's and publicsuffix's), which got me to thinking that I could parse these to find just the ones with three characters. I wrote a script in PHP and modified it to handle any number of characters. It looks like:

Continue reading post "Finding short TLD's"

Idea: Single character TLDs for permashortlinks

I've been interested in Indieweb lately, and have been looking for a good domain for permashortlinks. The article goes into more detail, but advantages include:

  • easier to read and type, especially from print
  • fit better, especially in character limits of twitter, email line wraps, etc.

I have a domain that's six characters total (SLD + dot + TLD), but I'm not sure I like it: It has a '0' in place of an 'o' (might confuse people); is on a TLD that disallows whois privacy; and doesn't feel as representative of me as some others I've thought of. It's hard to find good short domains. One reason, of course, is that short domains are desirable and are taken more quickly when available. Another is that ICANN and predecessors traditionally seem to have been reluctant to allow short SLD's. One and two character SLD's are often reserved or "premium".

Idea

ICANN could make available single character TLD's for URL shortening purposes, and make available on them SLD's of one or more characters. This would make available, using normal ASCII domain rules:

Continue reading post "Idea: Single character TLDs for permashortlinks"

Wordpress: Shortcodes

I've been playing with shortcodes in Wordpress. They provide a nice way to allow the client to insert certain content without them needing to even deal with HTML, such as predefined pieces or wrappers with specific classes or structure. They are the only way to effectively run PHP functions from within a page without actually allowing PHP code to be run. This can allow pulling things from data, such as custom fields or from Pods CMS. The built in [gallery] shortcode, for instance, pulls image data from the database about images connected to a post.

It's very easy to add a shortcode. You create a function that does what you want and returns a string to output in place of the shortcode then use the add_shortcode() function of Wordpress to attach it as a shortcode. The function is done like:

function repFunctionName($repArguments, $repContent=null){
	return "some string";
}

$repArgument is an array of arguments passed to the shortcode like:

[repShortcode repArgument1="value1" repArgument2="value2"]
Continue reading post "Wordpress: Shortcodes"

</toby>