Releasing LogThingy.com, a Domain Manager/Content Server

This last weekend was filled with a hackishly fun project: build a rails app that can route domain names to dynamically generated html content. The need arose from having too many domains and them being parked all over the place. I needed something all-inclusive. Ideally, a web site that lets me add newly parked domains and serve up the full html page creation dynamically.

Thus began a journey lasting about one week. Monday of last week I embarked to build said application and can report back today that I have launched it to a production environment, still in early beta stages. LogThingy.com, for lack of a better name, is a domain social network with content-parking capabilities. You can add domain names to your account, we’ll fetch all the name servers and expiration details, and then once your domain is parked onto my server the application will begin serving requests to that domain the html that you’ve stored.

This is an invite-only pre-release. There are numerous feature gaps, but things are running stable and you can see the net result by visiting some of the domains: synced.org, comparestrains.com, logthingy.com, answerwise.com

All domains serve a standard “Coming Soon” image unless content has been defined via the backend. You’ll see LogThingy.com is a “Coming Soon,” while the other domains have content (albeit slim). Thoughts and feedback welcome. Here are some screenshots of what things look like..

More updates to come =) Oh, and don’t forget about SimplyFor.US, updates were just rolled out over there.

Hanging in the Treetops

I wanted to find a way to parse short urls without making any database calls. Since I have a pattern for short urls I figured, for a bit of fun, a parser would make this possible.

Enter Treetop: Treetop is a language for describing languages. Combining the elegance of Ruby with cutting-edge parsing expression grammars, it helps you analyze syntax with revolutionary ease.” Treetop

The grammar defined is straight forward: (FILE: message_grammar.treetop)

grammar MessageGrammar
 rule message
   [0-9] / 'X' message / ('Y' / 'Z') message message
 end
end

So here are some valid codes: 0, X0, XY00, XX0, XY09
Invalid codes: T0, P, PPPPP0, X0X0X00

Make sure you’ve got treetop installed. Drop into terminal in the directory of the grammar file and run
tt message_grammar.treetop
This will result in a file called message_grammar.rb which you can include in another file to use as your parser…

File: message_parser.rb

require "rubygems"
require "treetop"
require "polyglot"
require "message_grammar"
 
# MessgeGrammarParser is a generated Parsing class based on the grammar
# defined in message_grammar.treetop
parser = MessageGrammarParser.new
 
STDIN.each do |string|
 
 # for each string, split on whitespace
 string.split(" ").each do |message|
   # print status of whether the message could be parsed or not
   puts "#{message} #{parser.parse(message) ? 'VALID' : 'INVALID'}"
 end
end

And we’re Done-zo Washington. Parse away.