[feedback]: http://reviewsby.us/feedback [r1]: http://reviewsby.us/restaurant/tony-romas/location/mall-of-america [s1]: http://spindrop.us/2006/04/26/easy_yahoo_maps_and_georss_with_symfony [fried]: http://reviewsby.us/tag/fried [r]: http://reviewsby.us I added a lot more features to [the reviewsby.us site][r]. One thing I was [ask][feedback]ed about was adding a price field. I added that in, it could use some work, but it is a start. I also cleaned up some of the location formatting (see [Tony Roma's at the MOA][r1]) so the phone numbers are legible. The real exciting thing is maps. Applying the same principles from the [Yahoo! Map tutorial][s1], I added maps to all the tag pages. Want to know [where to find fried food][fried]? Just look at the map. I'm taking a few shortcuts now. For example most of our restaurants are located in Minneapolis, therefore the maps seem to center in on the Twin Cities area. This of course may get messy over time when more restaurants get added outside the Minneapolis area. By then, I'll have some personalization setup to narrow down on restaurants based on where the visitor is located.
Read full post[c]: http://docs.info.apple.com/article.html?artnum=86284 [ad]: http://www.apple.com/batteries/notebooks.html [cc]: http://www.macosxhints.com/article.php?story=20050607144738149 [bu]: http://www.batteryuniversity.com/parttwo-34.htm I bought my current laptop (Powerbook G4 1.667GHz) about a year ago along with the extension of Apple Care support. I had enough problems with my older laptop, that it made sense to have it on the new one. Recently, my computer instead of falling asleep when its battery is drained, just lets the battery keep draining until the computer just shuts off. Not cool at all. I like to work outside where there's no power, but I like the cushion that the computer falling asleep affords me.
Read full post[r1]: http://reviewsby.us/about [r2]: http://reviewsby.us/restaurant/cheesecake-factory [r3]: http://reviewsby.us/restaurant/cheesecake-factory/menu/orange-chicken [r4]: http://reviewsby.us/restaurant/cheesecake-factory/menu/bang-bang-chicken-and-shrimp There's now an [about page][r1] on the site. One thing the site somewhat lacks is a compelling reason to contribute to it. I can get vistor upon visitor, but it's not going to make anybody want to get an account (a free one at that) unless there is a clear and obvious reason to contribute reviews. So let's state the obvious. My personal use of the site is to keep track of what I've ordered and whether or not I've liked it. If I have to go to the [Cheesecake Factory][r2], I'll know to order the [Orange Chicken][r3] and not the [Bang Bang Chicken and Shrimp][r4]. I check the site just before I go anywhere I've been before. In the future, I hope I can check the site before I go anywhere even if I've never been.
Read full post
layout: post title: Markdown for everything tags: [programming, Related Websites, javascript, symfony, reviewsby.us, php, markdown, tinymce, textmate, drupal, mod_rewrite, xhtml] — [mphp]: http://www.michelf.com/projects/php-markdown/ [mwe]: http://spindrop.us/files/markdown_everywhere-2006-04-28.tar.bz [symfony]: http://www.symfony-project.com/ [markdown]: http://daringfireball.net/projects/markdown/ [TinyMCE]: http://tinymce.moxiecode.com/ [rbu1]: http://reviewsby.us/restaurant/cheesecake-factory/menu/orange-chicken [df]: http://daringfireball.net/ [lj]: http://davedash.livejournal.com/ [textmate]: http://macromates.com/ [drupal]: http://drupal.org
Today, in a matter of minutes, I wrote a [really simple markdown web environment][mwe] in PHP. It’s nothing complicated by any stretch of the imagination, but for me at least it’ll be quite useful.
My intro to markdown
[symfony] had me seriously investigating [Markdown] for use in my own apps. The [symfony] Team has made a lot of design choices which for the most part seemed to ones that I liked. [Markdown] was interesting because my first thought was “that’s all fine and dandy, but I think I’ll stick with a [TinyMCE] editor instead.”
But, that’s a bit JavaScript heavy, and a bit much for [comment fields][rbu1], for example, or even an entire blog post. And after reading some posts from [Daring Fireball][df] over the years, I’ve started to take notice of its elegant format, and the captivating writing style. Obviously this was all the doing of [Markdown]… or not, but it served as a good selling point.
A month ago, I decided to start writing — not my [boring day-to-day journal entries][lj], but my more web related musings. I do a lot of coding that seemingly goes nowhere1, but I generally learn some very cool things. So I wanted to start documenting. I was writing for the web, but I really didn’t feel like writing things out was saving me any time, so I decided to take another peek at [Markdown].
I was sold pretty quickly, and with [TextMate] having support, I was sold right away. There’s something comforting about having easy to write code, that didn’t require me to write the same URLs over and over and generated consistent XHTML. They even had a plugin for it for [Drupal].
Building the markdown environment
For an article I was writing, I needed to put up some filler pages really quickly. I didn’t need an elegant environment, so even plain HTML would do. I wasn’t looking forward to writing plain boring XHTML though…
So I took some mod_rewrite
and a [Michael Fortin][mphp]’s PHP port of [Markdown] and had all my web requests for a folder go through a Markdown processor.
.htaccess:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
snippet of PHP:
require('markdown.php');
$q = $_GET['q'] ? $_GET['q'] : 'index';
$file = $q . '.markdown';
if (is_file($file)) {
$text = Markdown(file_get_contents($file));
} else {
$text = 'file not found';
}
// ... some fancy decoration and then we just echo $text
Not too much going on here. The script just looks for a relevant .markdown
file and converts it to XHTML and displays it.
Give it a try
Again, it’s not incredibly useful, but it saves me time. It would probably take you less time to write this than to download it, but who cares: [markdown_everywhere-2006-04-28.tar.bz][mwe]. Enjoy2.
[rbu]: http://reviewsby.us/ [ymap]: http://developer.yahoo.com/maps/index.html [gmap]: http://www.google.com/apis/maps/ [ygeo]: http://developer.yahoo.com/maps/rest/V1/geocode.html [GeoRSS]: http://developer.yahoo.com/maps/georss/index.html [symfony]: http://www.symfony-project.com/ [GeoRSS][GeoRSS] is an extension of RSS that incorporates geographic data (i.e. latitude/longitude coordinates). This is useful for plotting any data that might need to be placed on a map. While building out the [reviewsby.us][rbu] map, I decided to use the [Yahoo! Maps API][ymap] versus the [Google Maps API][gmap] because I wanted to gain some familiarity with another API. It was worth trying [Yahoo!'s API][ymap]. First of all, [reviewsby.us][rbu] has addresses for restaurants and Yahoo! provides a simple [Geocoding REST][ygeo] service. This made it easy for me to convert street addresses to latitude and longitude pairs (even though this wasn't required as we'll soon see).[1] The real selling point of [Yahoo!][ymap] was the [GeoRSS] functionality. I can extend an RSS feed (which [symfony] generates quite easily) to add latitude or longitude points (or even the street address), direct my [Yahoo! map][ymap] to the feed and voila, all the locations in that feed are now on the map, and when I click on them, the RSS item is displayed. That cut down on a lot of development time.
Read full postI improved a few things with the reviewsby.us site. The most exciting feature is the home page now features a Yahoo powered map. The map shows the locations of the latest restaurants. The GeoRSS feed that powers this will also be retrofitted to power other maps on the site. You can also subscribe to the GeoRSS feed if you want to for your custom applications. I also enhanced the way the tagging works a little bit. The tag-guessing system works fairly well now. The final enhancement is this blog. I'll try to keep all the site updates here.
Read full postA week or two back I launched reviewsby.us. I'm still missing some components that will make it a lot better and more useful, like an about page. So what is it all about? Katie and I frequented restaurants like The Cheesecake Factory and we'd inevetably order a dish that we really liked or sometimes a dish we could have done without. So I started logging them in my wiki. Well, that worked for a while, but I thought letting other people in on the action would be even better. So I created reviewsby.us. People now have a site where they can share their dining experiences, and comment on their favorite dishes and dishes that they want to avoid.
Read full post
iPod headphones give you away. So I pointed out to that you can always tell who’s got iPod headphones last week. Guess we’re not the only ones that notice them.
Read full post
anybody been to who-remembers-me.com ? I got spam from it I think, but it may have been legit. Sounds interesting.
Woke up super early, was going to leave for work at 6:30, but my car said “Car-X, now” and wouldn’t start. The starter had been finicky for the last week, but I just thought my floor mats were getting under the clutch, but yesterday it was really bad. I called around and decided I’d take it to Car-X soon. Soon means today apparently. So they took it apart and it’s as good as… well it’s good. The car sounds different, but that’s okay.
Now when takes it for a spin she’ll not be off to a bad start (no, really no pun intended… I just couldn’t phrase it any other way).
Read full post