Blog blog blog, blog blog blog

I’ve been a lazy blogger still. It’s quite sad, at least once a day I come up with a rant that I say to myself “Hey that would make a great blog post”, and yet I never put pen to paper… or fingers to keyboard as it were.

I’m working on that. However I have done some blog facelifts and improvements to hopefully re-inspire myself to do the writing that I really love.

First up the primary font has now been changed to Helvetica Neue Light, it’s really a gorgeous typeface. Likely this will still render as Arial on Windows desktops. Heck, it even renders different on Safari vs Firefox side by side on the same laptop. I really pity real web designers, doing a cross-platform pixel perfect UI in HTML 5 would be an exercise in pain and maybe impossibility.

I also changed some spacing and cleaned the general layout ever so slightly. There should be an extra line (or line and a half) of text on each page now.

I’ve also changed the ‘large’ image size that WP pre-crunches to be 600px instead of 1000px. I’ll be able to have full width images without breaking the layout now, however legacy images are all going to be the defaults. Over all I think it’s a definite improvement to readability and aesthetics, quite pleased with my cave-man with two sticks CSS efforts. Through a couple years of tweaking and modifying, the site is quite far from the original WP theme I bought. I’ve now changed the name of the blog from ‘[email protected]’ to ‘nick@’, the kavassalis.com is now implied :P

The next major change is that I’ve “moved” the hosting of the blog to CloudFlare. CloudFlare offers free and lunatic-cheap CDN services as well as inline HTML optimization and security. The tech seems awesome, and it came with a glowing endorsement from Brandon.

I plan to use kavassalis.com as a bit of a test bed for other projects. Sadly it won’t be the best data, page views are pretty low compared to the 4-digit unique view days (and even a occasional 5-digit!), I’ll have to write something really controversial again…

I really love the tech, and I recommend reading up on what they offer. My only wonder is how they’ll make money at their current pricing. It’s wild value for the money compared to any other CDNs I know. Wild isn’t a strong enough word. It seems insane. But hey, maybe they have a really cost effective network (affordable hardware & colo, tons of peering?) and that’s their genius. I’ll definitely write more about my experiences in the future.

 

Comments: Leave a Comment

Updated URL shortening rewrite

Something I’d meant to do since the day I did it was to add the rewrite rule so that I could exclude the l? from URL shortened links my social bookmarker generated. (I had been repeatedly poked for leaving this out too) The original idea->implementation was 30 minutes, so this takes it up to 35 minutes for the project, and only took a few months to implement. My entire .htaccess including the WordPress business is:

RewriteEngine On
RewriteRule ^([a-zA-Z0-9]{3,3})$ l.php?$1 [L]
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

And everything seems to be working as it should. That brings me up to 122 characters for the messages that accompany my URLs!

Tag Search: , , ,
Comments: Leave a Comment

The life and times of Dylan

So I’ve been working on a DQ9 review for the past 3 weeks, which went from early impressions, to mid impressions, and now I’ve just gotten side tracked. Anyway, here are some photos and a brief story.

On August 3rd, Eva found a caterpillar on the dill while we were house sitting and taking care of Molly. We quickly identified him as a Black Swallowtail caterpillar thanks to google:

Some quickly googling further and we made a little home for him out of a Chinese takeout container, dirt, a water dish a small stick and lots of dill. Seen here on top of the coffee maker getting some sun.

By August 6th, he had more than doubled in size (after eating almost all the dill we could pick), and we decided he needed a larger home.

We had picked a vase up when grabbing some stuff from home the previous day, so we built him a new home. Same dirt, a bigger stick, new water dish and more dill.

On the morning of August 8th, we noticed Dylan had suspended himself by a thread under his log, and we knew he had finally eaten enough.

We checked back all day but no change, however this morning…

Sure enough, it was just as we read, his cocoon matched the color of the stick (they apparently can range from brown to bright green). Goodbye Dylan the caterpillar. 9-11 days and Dylan the butterfly will emerge. Dunno if we will be here to see it, but here’s hoping!
I feel like I’m writing a children’s book :)

Tag Search: , ,
Comments: 3 Comments

Lack of updates, link aggregation

So first off I apologize for a lack of blogging. It always seems to fall to the side when life gets busy. My main priority right now is working on (and eventually) finishing going through Florida pictures, but everything seems to get in the way including taking more pics to add to the queue.

One thing I’ve wanted to do for awhile though is have a way to manage my interesting links. I read a lot of tech and science news in the morning and like to share said articles with family and friends. So I generally share them with Facebook, or Twitter (which in turn *usually* trickles back to Facebook unless their plugin is broken), but neither is really a trust worthy place to put any information you care about. I really like the way Justin does it, but also wanted to tie a quick push to Twitter (and thus Facebook) in.  So I figured I might as well write a little social bookmarking thing.

The entire hack took about 30 minutes, including the time to register a cheap (i.e. not taken) and very short (3.2) domain name (k4v.ca) for my built in URL shortener as using kavassalis.com?blah seemed a touch long. I have yet to display my links in the blog layout, but I will probably whip up a widget tomorrow morning to appear on the right side of all the pages with the last N links. Anyway the code is pretty ugly and basic but here it is:

The actual link forwarder: (l.php)

if (sizeof($_GET)!=1) { header("Location: http://kavassalis.com/"); }
$code = key($_GET);

$dbUser = "abc";
$dbPass = "xyz";
$dbName = "nick_blog";
$dbHost = "127.0.0.1";

@mysql_connect($dbHost, $dbUser, $dbPass) or header("Location: http://kavassalis.com/");
@mysql_select_db($dbName) or header("Location: http://kavassalis.com/");

$result = mysql_query("SELECT link FROM links where code='$code'");
$rows = mysql_num_rows($result) ;

if ($rows == 1) {
$link = mysql_result($result,0,"link");
header("Location: $link");
} else { header("Location: http://kavassalis.com/"); }

(The obvious flaw is that it doesn’t give an error to the user if the database is down, but I didn’t feel like doing that so…)

and here is the link creator: (bookmark.php)

function mkCookie()
{
$pool = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890';
for ($i = 0; $i < 3; $i++)
{ $result .= $pool{rand(0, 61)}; }
return $result;
}

if (!isset($_GET['link']) || !isset($_GET['blurb'])) {
*** FORM HTML WOULD APPEAR HERE, THANKS WORDPRESS ***
} else {

$blurb = $_GET['blurb'];
$link = $_GET['link'];

$dbUser = "abc";
$dbPass = "xyz";
$dbName = "nick_blog";
$dbHost = "127.0.0.1";

@mysql_connect($dbHost, $dbUser, $dbPass) or die("Bah, cannot connect to my DB...");
@mysql_select_db($dbName) or die("Bah, cannot select my database...");

// make sure we dont dupe codes, even though the code space is huge (62*62*62)
while (1) {
$code = mkCookie();
$result = mysql_query("SELECT id FROM links where code='$code'");
$rows = mysql_num_rows($result) ;
if ($rows < 1) break;
}

$result = mysql_query("INSERT INTO links (code,link,blurb) VALUES('$code','$link','$blurb')");
$url = "http://k4v.ca/l?$code";
header("Location: http://twitter.com/home?status=$blurb> $url");
}
?>

Amusingly the WordPress < code > block really seems to detest HTML, i.e. WordPress renders it even though its inside the block, that just makes no sense… Too lazy to figure out how to do it for a 4 line form. So yea, thats the code. No URL tracking/stats, but thats not really what I was going after. I just wanted an easy one click way to share URLs everywhere at once, and store them somewhere safe.

Things have been generally busy work wise, home wise. I am going to try and blog more again. Today being May 5th means that Mucho Burrito has $5 12″ burritos and I’m going to go and see if I can’t manage to consume two between now and dinner. Toodles!

Comments: 5 Comments

Hello world!

So I’ve decided to catalog some of my development projects / experiments as well as make my general rants bigger than the SMS sized text field twitter allows. So for the 800th time, I’m launching a blog.

So far I think I’m going to approve comments by hand, but once someone has an approved comment they can post instantly. That shouldn’t be too much effort, but we’ll see how it goes. I’m feeling too lazy (it is Sunday morning after all) to dig up some captcha plugin and install it. Wordpress is always very enjoyable to install, its quick and painless. The photo I threw uptop was taken last Fall in Mississauga’s Port Credit. Here it is in its entirety. I chose it due to fairly similar colors to the theme I chose. I will likely change it in the near future.

(I did however throw up a Twitter plugin to syndicate all my rants to my various social media outlets. I apologize for any perceived spam in advance!)

Don’t have too much to say other than that, it is Sunday morning after all. Cheers!

Comments: 3 Comments

Recent Photos

Red List’s Species of the Day