crshman's Profile Page

Archive for » 2009 «

Wednesday, May 13th, 2009 | Author:

Hey All!

Post title totally inspired by TF2…so be sure to say it in that voice =P

As I’m sure most of you locals, and you non-locals that watch the news, have heard that there is yet another epic fire in Santa Barbara…this will make it the 5th? fire that I’ve experienced during my time here at UCSB! So as per tradition, I set out to get some cool pictures of the carnage in action! A link to the full gallery can be found here. And some of the highlights below:

All these were taken with my trusty Sony A200 rocking the ghetto ass BeerCan Telephoto.

Until next time….laterz

Category: Photography  | Tags: ,  | Comments off
Friday, May 01st, 2009 | Author:

Hey All,

So yesterday I got all the parts I needed to complete my Bantam USB-DAC I’m still not entirely sure how I was able to successfully mount the SMC DAC onto the board…..but nevertheless I got it done. Took about 5h total from unboxing to plugging into my laptop for testing. I was a happy camper to learn that I had gotten it right on the first try! Holy crap! No magic smoke, no pops, no clicks…just magic! Just lots of love from dmesg:

[   21.170469] usbcore: registered new interface driver snd-usb-audio
[   21.178119] input: Burr-Brown from TI               USB Audio DAC    as /devices/pci0000:00/0000:00:02.0/usb2/2-1/2-1:1.2/input/input3
[   21.204635] generic-usb 0003:08BB:2707.0001: input,hidraw0: USB HID v1.00 Device [Burr-Brown from TI USB Audio DAC   ] on usb-0000:00:02.0-1/input2

Here is a link to ALL the photos for those who care.

And below are a few of the highlights:



Hopefully next week I get the rest of the parts to build my mini^3 then I’ll be cool like my roommate with a dac/amp….minus the $450 price tag 😉

Until next time…..Robert

Category: General  | Tags:  | Comments off
Monday, April 27th, 2009 | Author:

Hey All,

So today I was finally able to go on a fun photo shoot with Susan! She wanted to learn more about her SLR system and how to take pictures so I figured it’d be a fun trip to go play the role of the teacher for once. We took pictures State Street, the Santa Barbara Pier (Sterns Warf), Santa Barbara Mission and up in the Santa Barbara mountains. Here’s a link to my Gallery and some of my favorite shots are below:

Hope you enjoyed that! =D

Until next time…..Robert

Category: Photography  | Tags:  | Comments off
Thursday, April 23rd, 2009 | Author:

Hey All,

So I have an account over at JaguarPC and I love it a lot there, they support everything I need and help me with all that I ask. However, there seems to be a snafu/caveat what have you to running RoR (Ruby on Rails) apps at JPC. cPanel runs RoRs apps using a mongrel instance, this is fine and it works….but sometimes it dies and needs to be restarted. Highly annoying….I run my redmine installation off of one of these mongrel instances and I really can’t have it be down. So….I devised this little gem below to check if your mongrel instance is down, if so to restart it.

To use the script throw it in your cPanel root and add the following line to your crontab:


*/5 * * * * php ~/reboot.php

Be sure to update the command above to reflect what you named the script…..

Hopefully someone else finds it useful and if you need help with the script comment!

cPanel Ror Mongrel Reboot


<?php
/*
 *
 * cPanel Mongrel Rebooter - v0.1
 * Author: Robert Navarro <[email protected]>
 *
 */

/*
 * The siteCheck function has the following parameters
 *
 * $url - This is the url of the application you want to check
 * $searchString - This is the erroneous string you want search the site for
 * $appPath - This is the full path to your cPanel RoR app installation
 * $appPort - This is the port that your cPanel RoR app runs on
 *
 * You can find the application port by running:
 * # ps aux |grep mongrel |grep <your username>
 *
 */
siteCheck("http://<my redmine install>","502 Proxy Error","~/Sites/<my redmine install>/","12001");

function siteCheck($url,$searchString,$appPath,$appPort) {
 // open the remote URL for reading
 $fp = fopen($url, 'r') or die('Unable to open file '.$off_site.' for reading');

 $buffer = '';

 // read in chunks
 while(!feof($fp))
 {
 $buffer .= fgets($fp, 4096);
 }

 // strip HTML but leave the tags you want
 $output = strip_tags($buffer,'<a>
<ul>
	<li>
<h2>
<h1><span>');

 // convert all whitespace, tabs and newlines into one single whitespace
 $output = preg_replace('/\s+/', ' ', $output);

 if(strstr($output,$searchString)) {
 restart($appPath,$appPort);
 }
}

function restart($path,$port) {
 exec("cd $path;mongrel_rails start -p $port -d -e production -P $path/log/mongrel.pid");

}
?>

Category: Development  | Tags:  | 5 Comments
Tuesday, March 31st, 2009 | Author:

Hey All,

Well I was going to include this post with my last one, but I figured I’d separate the two being as they are two completely different content types (for the most part). So I’ve officially jumped ship from SVN to the Git SCM and man….I’ve been missing out on a lot! Branching, distributed-ness, forking….all wonders of the modern day developer!

With that I’ve also decided to move away from a perpetual trial of ZDE =X to a more legitimate, purchased copy of the Aptana Studio Professional Plugin. The guys over at Aptana were kind enough to bless me with an educational license of their eclipse addon at half price! Thanks again guys!

Another thing that I’ve been trying to get myself into is TDD (Test Driven Development) to better standardize my coding methodologies and to reap some of the benefits that TDD offers! It’s definitely a monumental shift in my programming paradigm and thinking, but in the end I think it will be well worth it! I’m still trying to get my head around the actual testing and implementation of TDD (the concepts behind it are relatively easy to understand), if anyone that reads this knows what I’m talking about feel free to comment so we can discuss!

That’s all for now! L8rz

Category: Development, General, Internetz  | Tags:  | Comments off