22 February 2009

A Crisis of Credit

A simplified and well animated explanation of the credit crisis.


The Crisis of Credit Visualized from Jonathan Jarvis on Vimeo.

16 February 2009

Harry Chapin on his grandfather

"My grandfather was a painter. He died at age eighty-eight, he illustrated Robert Frost's first two books of poetry and he was looking at me and he said, 'Harry, there are two kinds of tired: there's good-tired, and there's bad-tired.' He said, 'Ironically enough, bad-tired can be a day that you won. But you won other people's battles, you lived other people's days, other peoples agendas, other people's dreams and when it was all over there was very little "you" in there, and when you hit the hay at night, somehow you toss and turn--you don't settle easy.' He said, 'Good-tired, ironically enough, can be a day that you lost. But you don't have to tell yourself, 'cause you knew you fought your battles, you chased your dreams, you lived your days, and when you hit the hay at night, you settle easy--you sleep the sleep of the just, and you can say "take me away."' He said, 'Harry, all my life I've painted. God, I would've loved to be more successful, but I painted and I painted, and I am good-tired and they can take me away.'

Now, if there is a process in your and my lives in the insecurity that we have about a prior life or an afterlife and God--I hope there is a God. If He is-- if He does exist He's got a rather weird sense of humor, however. But let's just-- But if there's a process that will allow us to live our days and will allow us that degree of equanimity towards the end, looking at that black, implaccable wall of death, to allow us that degree of peace, that degree of non-fear, I want in."

-Harry Chapin

12 February 2009

Flora Watch

From [Madison's Flowers]:

This is an aside, but I noticed a few of my favorite early spring bloomers are coming into flower over the last couple days.

This is a yellow crocus blooming in front of my boyfriend's house. I planted a set of these in fall 2007 and adore them. Even when the brief flowers wither, the slender leaves persist like a delicate grass. Crocus species are in the iris family are not true bulbs--they overwinter as a specialized stem called a [corm]. The stigma (female reproductive structure) of Crocus sativus is dried to become the coveted spice saffron.


Carolina yellow jessamine (Gelsemium sempervirens) is a climbing vine that is also the state flower of South Carolina. Its yellow, trumpet-shaped flowers are fragrant and abundant, contrasting with the slightly glossy, dark green leaves. Once you know what it is, you'll see it everywhere (and I hope you will). This clump was planted near the corner of North and Glenwood Streets in downtown Raleigh. There's also a really stunning planting of jessamine on the arbor in front of Withers Hall on the N.C. State campus.

The flowering cherries/almonds/apricots (Prunus species) are coming out! The flowering apricots (Prunus mume) just finished their flowering cycle so I hope to have some pictures of their fruit set later in the season. Either way, I saw some beautiful okame cherry trees (Prunus campanulata 'Okame') when I was in Cameron Village Tuesday. The pears, peaches, and crabapples should start showing signs of flower soon as well. I can't wait for the kwanzan cherry (Prunus serrulata) my boyfriend and I planted together to come into its own in a few months.

05 February 2009

Enabling Facebook RSS feeds in SweetCron

The "For Dummies" version of enabling facebook RSS feeds in [SweetCron] lifestreams:

Finding the RSS feeds for your personal status updates and posted items approaches unintuitive. Log into facebook and go [this filter]. In the lower righthand sidebar there's a box saying "Subscribe to these updates" or something close to it. Click it. You'll also want to get your posted items feed URL and that's much easier to find. Go to your posted items page and it's a similar format to the status updates.

Copy this URL and enter it in the "Add New Feed" section of your SweetCron dashboard. Before you hit enter, change all three instances of & in the URL to %26 so the SweetCron GUI won't be angry at you.

Here's the catch: you need to go back into your database and edit the %26 back to &. You could enter the feeds directly into the database, but if you aren't used to doing that sort of thing (like me), you can do it this way. I use 1and1 hosting, so I logged into my customer control panel admin and clicked to MySQL administration. The "phpMyAdmin" button next to your SweetCron database takes you right where you need to go. From there's it's pretty easy to click on the "feeds" option in the left sidebar and edit what you need.

After that, you can treat it like any other feed in SweetCron!

I think there's an RSS for your facebook notes as well, but I haven't added it yet.

SweetCron: Customizing the Boxy Theme

There are great resources for customizing [SweetCron] themes on the [google SweetCron wiki] but they assume you know what you're doing under the hood as far as the programming goes.

Because SweetCron is still pretty new, there aren't a lot of free (or paid, for that matter) customized themes and plugins available for download. Plus, there are a lot of feeds out there!

You'll want these two pages from the wiki on [themes] and [API] references.


There are two main files you need to edit in your theme for directory (system/application/views/themes/yourtheme). I copied the boxy theme as a base and renamed the directory to something else. That way if I messed up I could get the fresh copy again.

Anyway, the files are _activity_feed.php and main.css.

Add support for a new feed
Add the desired RSS feed in SweetCron using the GUI. I'm using my google reader shared items as an example. Now, when I look at my lifestream, items from that feed have their own box but say something like, "I don't know what to do with this but I see it."

After that, I opened up the _activity_feed.php to tell SweetCron to make it show up in my lifestream correctly.

Near the top of the text is a note for "domain specific boxes" and this does what it sounds like it would.

So if we want to create a box for google shared items, we add

<?php elseif ($item->get_feed_domain() == 'google.com'): ?>
<div class="inner_container">
<p><a href="<?php echo $item->get_permalink()?>/<?php echo $item->get_name()?>"><?php echo $item->get_title()?></a></p>
</div>


I guess the first couple lines tell it what it's looking for and where to put it, but don't quote me on that.

I don't know the specifics, but see how the third line starts out with a paragraph tag and a hyperlink tag? That's basically what it is. The <?php echo $item->get_permalink()?>/<?php echo $item->get_name()?> sort of gets the url of the item, so it's really like <a href="urlgeneratedbythatstuff.com">. All the <?php echo $item->get_title()?> is doing here is telling it what title to put in between the hyperlink tags.

There are other things you can do using the list of things in the [API] reference page.

What if you want more than just the title? Blog posts and google shared items might have some text you'd like to have previewed in your boxes. To add preview text, do this:


<?php elseif ($item->get_feed_domain() == 'google.com'): ?>
<div class="inner_container">
<p><a href="<?php echo $item->get_permalink()?>/<?php echo $item->get_name()?>"><?php echo $item->get_title()?></a></p>
<p><?php echo word_limiter(strip_tags($item->get_content()), 30)?></p>
</div>


That new line tells it to go find the content of the item and display it. The numeral 30 is how many words you want to preview and you can change that.

There are lots of other things you can do like find and display images, video, and tags but they all follow a similar-ish procedure.

Some basic visual customization
If you work with CSS a lot, great. You probably don't need to read this. If not, here's what I did to change the link colors and background of my boxes and add that attractive dotted line between post titles and content. Other than that it's all really normal editing to control how the page looks.

New link colors and sizes within the boxes
This needs to go in the section of main.css called "Typography," near the top of the text. If you get to positioning, you've gone to far. Go back up.


p.original_link a:hover, p.activity_image_text a:hover, li.item.google_com div.item_inner a:hover {
text-decoration: underline; color: #236B8E; font-size: 16px;
}

p.original_link a, p.activity_image_text a, li.item.google_com div.item_inner a {
text-decoration: none; color: #236B8E; font-size: 16px;
}


a is the link color and a:hover is the hover color. text-decoration here tells it to only display the underline during hover.

New box backgrounds
Upload your new background image to system/application/views/themes/yourtheme/images.

Find the section in main.css called "Per-Domain Styling." Add this:


ul#activity_list li.item.google_com div.item_inner {

background: url(images/googback.jpg) bottom center no-repeat;
}


where the image it pulls is the one you want.

Adding a dotted line to boxes that also pull content
Somewhere in "Per-Domain Styling" you can add this:


li.item.google_com div.item_inner a {
border: 1px solid #7698b7;
border-style: none none dotted none;
display: block;
padding-bottom: 5px;
margin-bottom: 5px;
}


You can adjust the type of line (I like the dotted one), the color, the size, and some other stuff about the container.

SweetCron: Installing without really knowing what you're doing

I decided to set up a lifestream on [metricula.com] so I'd have something to put there. I mainly use it to host images and such, but there you go. For the uninitiated, a lifestream aggregates actions I take on lots of sites across the Web.

I decided to use [SweetCron]. It's like [FriendFeed] except all the data is hosted on your own server. I also liked the layout.

1. Download
Go to [SweetCron] and sign up for their email thing for a link to download it from google. You can also get it straight from google, but I wound up having to register my email later anyway so you may as well do it now. For reference, though, it's [here].

You'll get an email with a link. Download the file and unzip. Yay! The [official installation guide] has the requirements. It boils down to needing PHP5 and MySQL4.1.

2. Set up a database
Okay, once you've got that downloaded you need to set up a database for it. I use 1and1 hosting, so after I logged into my admin dashboard I went to MySQL administration. Click the "New Database" button at the top of the table with the list of databases. You probably want to go ahead and select the option for PHP 5.0.
Hit okay and leave this page open because you'll need the data from it.

3. Get it on your server
Copy the contents of the folder (but not the folder itself) sweetcron-108e/sweetcron to your chosen directory with your FTP of choice. If you're putting it in the root directory, great. If you want it somewhere like yoursite.com/lifestream, make a directory for it and copy it all there.

4. .htaccess file
You should have copied something called .htaccess. If it was invisible to you and it didn't copy, there are [instructions for making a new one]. If you're going to install SweetCron in a subfolder, make sure you account for that in the .htaccess file; you need to add the subfolder after the slash in the .htacces file so it looks like this:

Rewrite Base /yoursubfolder

Once it's on your server you just need to configure two files located in system/application/config.

5. Configure config.php
Rename config-sample.php to config.php. Open it up and replace http://www.your-site.com/ with your full site url. That trailing backslash is important so don't leave it off.

If you installed SweetCron to a subfolder, make sure you include it in the url.

6. Configure database.php
The next thing is the database configuration. Rename database-sample.php to database.php. Open her up and scroll down.

Go back to the page you opened earlier with your new database information and enter it here. The titles correspond from the browser display to the database.php file.

You need to change the localhost, database name, user, and password. If it's not recognizing your local host, you can add :/tmp/mysql5.sock to make the whole string look like this:
$db['default']['hostname'] = "pastedhostname:/tmp/mysql5.sock";

I don't know what that does but I think it made mine work.

7. Run the Web-based install script
So great! You should now be able to go to http://yoursite.com/admin> or http://yoursite.com/subfolder/admin to run the install script.

If you get an error telling you to upgrade to PHP5.0, no worries. You probably just need to insert the following into your .htaccess file:


AddType x-mapp-php5 .php
AddHandler x-mapp-php5 .php


Again, I don't know what it does but it makes it work.

Once you're into the GUI it's pretty straight forward. Just add feeds and go! SweetCron doesn't support every feed under the sun by default, but you can tell it how to support and display a feed using the files _activity_feed.php and main.css in the directory system/application/views/themes/nameoftheme.

It helps to be familiar with PHP and using CSS, but I was only slightly familiar with CSS and knew ZERO PHP and I was able to figure it out and get it customized closer to my liking in about a day. It's still a work in progress visually, but the most important and time consuming thing was learning how to tell the _activity_feed.php file how to get the non-default supported feeds.