Hello there. I am Terry and I am a full-time undergraduate based in Singapore. I take photos, write a blog and design websites.

And no, I'm not a teddy bear.

Launching two new sites

After the past few weeks, I was busy with the work I’m getting from my internship position with a local design firm, but I still managed to dedicate enough free time to two sites I was launching. They’re not really community-powered sites, so there’s nothing hyper about it *laughs*

Tweet Archive (link)

Tweet Archive

Tweet Archive

In light of the recent instability of Twitter, especially over the one-month span of the World Cup, I have decided that backing up my tweets on a remote server will be a wise choice. Not only does the remote server helps to archive all the tweets that I have been posting since then, it also creates a searchable tweet archive. Don’t you find it frustrating that even you yourself can’t comb through your own tweets on Twitter web interface?

However, I was only able to retrieve down to the last 3,200 tweets (dating back to August 2009). The 3,200 cap was placed on Twitter API to prevent it from being overloaded with requests… which means I’ve lost around 5000+ of my older tweets, but it’s okay.

I got the idea after Jeff (@perishable) wrote about backing up his tweets during Twitter’s wobbly period. And he has got his tweets backed up already, too.

Jeff's tweet about archiving his tweets

Jeff's tweet about archiving his tweets

What I did wasn’t exactly quite rocket science (maybe except for the regex part):

  1. Upgrade my site to WP3.0, and activate the WP multisite feature. If you’re done with this step, everything will be a lot easier. Note: Please check with your host if they support wildcard DNS, i.e. *.domain.tld. If such a feature is not offered, it’s not all kaboom. Simply create a new WP installation in the subdomain’s root directory.
  2. Install a new child blog pointing to http://tweets.teddy-o-ted.com
  3. Download your Twitter archive – I recommend TweetBackup. Export the latest 3,200 tweets (or less) as an RSS feed and download it. Try to refrain from tweeting between downloading your Twitter archive and the completion of the set up – you wouldn’t want any tweets to fall through.
  4. Import your Twitter archive to your WP installation. If your server is slow, the import script might exceed the 30-second execution time limit and you will encounter a timeout error. Don’t panic. Go to your WP installation and check the earliest tweet that was successfully imported. Return to your RSS file, and remove all entries prior to that, which should shave a sizeable chunk of bytes off the original RSS file. Reimport the file.
  5. Install Alex King’s TwitterTools WP plugin. The plugin has quite a lot of function, but I configured it such that it only imports my tweets and post them. The plugin can also create a tweet from your WP post, but enabling this feature might cause a non-ending loop (although it is claimed that the plugin is designed to avoid such fireball of death, you should be smart enough to avoid it).
  6. Get a theme. Doug has an excellent one, go get it. Alternatively, you can modify any WP themes you want. The theme I am using for my tweet archive is a modification of Sandbox, modeled after Doug’s theme as well.
  7. Regex. If you’re quick, you’ll notice that all imported tweets lack outbound links for @replies and #hashtags. I wrote a short php function to do this. Insert the following lines into your theme’s functions.php file:
    // Makes URLs, @usernames and #hastags in tweets clickable
    function tweet_replies_url_filter($content) {
    	// Prevent premature texturizing
    	remove_filter('the_content', 'wptexturize');
    	// Replaces username with clickable link
    	$pattern_username = '/\@(\w+)/';
    	$replace_username = '@<a href="http://twitter.com/'.strtolower('\1').'">\1</a>';
    	$content = preg_replace($pattern_username,$replace_username,$content);
    	// Replaces hashtag with clickable link
    	$pattern_hashtag = '/\#([a-z][A-Z])(\w+)/';
    	$replace_hashtag = '#<a title="Search Twitter for \2" href="http://search.twitter.com/search?q=\2">\2</a>';
    	$content = preg_replace($pattern_hashtag,$replace_hashtag,$content);
    	/* Uses internal WP command make_clickable to replace URLs with clickable link */
    	$content = make_clickable($content);
    	add_filter('the_content', 'wptexturize');
    	return $content;
    add_filter('the_content', 'tweet_replies_url_filter');

For more information, you can read it up here. Doug has done a great writeup on establishing your own Tweet Archive.

tdy.co (link)

tdy.co - A personal URL shortener

tdy.co - A personal URL shortener

When the .co domain was opened to the general public on the 21st of July, I wasn’t very sure what domain name do I want. The first thing that actually went through my mind was to purchase tmun.co because tmun.com was already parked (and I have no idea why). When searching for available domain names on GoDaddy I decided to try my luck and started jamming the searchform with 3 letter acronyms of my site, my nickname or my other pseudonyms.

Try.co, taken. Tsd.co, taken. Ted.co, taken. Tdy.co, still available. What?!

I jumped. Immediately I billed $26 to my credit card and snagged the domain name before anyone else does. I had no idea what I wanted to do with it until I saw Dean’s tweet about converting his new domain, djr.co, into a personal URL shortener and I thought, hell, why not?

I downloaded a fork of Shaun Inman’s Lessn, developed by Alan Hoogan, called Lessnmore. Lessn is a great simple tool and is a lot lighter than Yourls, but it doesn’t support custom slugs unless I modify the database entry. I dug around and arrived at Lessnmore. It’s an extension of Lessn, and has a little more functionality with the same API hooks as Lessn.

tdy.co/1 points to this site :)

The tdy.co main page is a little plain. However, it is a significant example because it is my first HTML5 page. I’ve never really got into using HTML5 in my current projects because of my unfamiliarity with it, so I’m more than elated that it worked out just fine on tdy.co.

Burn after reading » Now you're done reading. What's next?


Related posts that might interest you:


Posts that are popular among visitors:

Share it

If you've enjoyed the post, or think that it might be useful to others, do share in on a social network site that you're using. Thank you!

  • Digg
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • StumbleUpon
  • Technorati
  • LinkedIn
  • Reddit
  • Design Float
  • Identi.ca
  • Live
  • Ping.fm
  • Print this article!
  • Twitter
  • Netvibes
  • HackerNews
  • Slashdot

11 responses to “Launching two new sites” » Leave a response

  1. m3d

    hey coussie…are u taking on web design work on a part time basis? let me know and will intro some cust to u whenever i come across any ;)

  2. DanResponse

    Simply love your work Terry! You amaze me each and everyday with the brilliance you come up with! You inspire me each and everyday!

    Keep it up man! Keep it up! You are so good at what you do, you put me to shame haha! Love the tweets archive such a great idea! I’ve always wanted to see my very first tweet! AMAZING!!!

    Love your URL Shortener domain! I bought IUSD.me short for (ifuseekdan.com) Still working on it :)…

    I hope to be able to design like you in the future and challenge myself. You truly amaze me, and I mean that with everything! I’m not trying to suck up to ya! But man it just amazes me! :)

  3. clairessaResponse

    Ah, internships. I have one now and it’s killing me a little but I love it :) Twitter instability makes me sad. I lost all of my @’s so that was a bit of a bummer but I’ll live. One of my favorite things to do before a new year is to go back and read the tweets of the previous year so I might look into backing mine up. I’m so happy you included a tutorial lol. Bookmarked :)

  4. Manmohanjit SinghResponse

    Nice stuff! The tweet archive is really impressive, never thought of it :D

  5. DaynaResponse

    Both “projects” sound great especially the personal URL shortener idea! :)

    I understand how busy internship can be. With my new job, I don’t even have time to blog at all. Perhaps I should attend some time management courses. -.-”‘

    How are you able to do so many things at once? ;)

  6. travel BlogResponse

    Children were throwing bread in the water for the fish
    so they kept close to the edge. You never know, it could lead to not wanting to
    leave. Most of these restaurants are buffet-style with the option of ordering off a menu
    if desired.

  7. NLResponse

    It’s going to be end of mine day, except before ending I am reading this impressive piece of writing to increase my know-how.

  8. Christy TreatResponse

    Pretty element of content. I just stumbled upon your weblog and in accession capital to claim that I acquire actually loved account your blog posts. Anyway I will be subscribing on your feeds or even I achievement you get right of entry to persistently fast.

  9. Cheri RectorResponse

    Paragraph writing is also a fun, if you know afterward you can write otherwise it is difficult to write.

Leave a Response » Share your thoughts or Return to top

Your name is required. Why?

  • So that I can address you personally (which I'm more than happy to do).
  • Everyone loves their name to be called, right? Nobody wants to be referred to as 'a certain someone' or Mr X (X-Men members aside).
  • If your post too much spam, your name will be imprinted on a personalised voodoo doll, completely free of charge. I'm just joking!

Your email is needed. Why?

  • Your email is, and will, never be given out to any third party under any conditions (except for people sneaking up behind me when I'm on WP admin).
  • So that I can contact you personally in case of certain issues that I wish to address personally.
  • If you post too much spam, I'll email the same spam you've posted 10 times back to you, completely free of charge.

You can always leave a personal URL behind

  • It can be anything - most people put their blog URL, their facebook page, their Twitter URL, their MySpace or etc.
  • I give love back by saying NO to no-follow. All of your webbie links are dofollows instead.

Twitter. Twitter. Twitter.

  • What is Twitter?: Twitter is a social networking and micro-blogging service that enables its users to send and read other users' updates known as tweets. Tweets are text-based posts of up to 140 bytes in length.
  • What is my Twitter ID?: To get a Twitter ID, you simply have to sign up for an account at Twitter.com. Your ID will be in the format of your profile's URL - http://twitter.com/[userid].

Comment notes

  • Gravatar: You can register for one at Gravatar.com
  • XHTML: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">
  • Codes: Wrap them up with <code></code> tags.

Hello Easter Egg hunter! You've discovered the magic of the Konami Code!

Yea. You probably know what the Konami code is before getting to this page. So now what? Here is a randomised YouTube video on my favourites list... which includes Rickroll, if you're luck enough to get it.

You are currently watching Family Guy - Stewie Get's a Nightclub. Loving it? You can even watch the video in its full screen glory :)

The Konami Code:
Konami Code sequence