Posted in Linux/Unix/OpenSource by: sean
1 Comment
03 Nov
For some one off scripts I wanted to make use of a couple of models I created. I had no idea how simple it would be to load the rails environment from within a script: require ‘config/environment.rb’ p MyModel.find(:first) Sweet! Rails is so… thoughtful.
Posted in Linux/Unix/OpenSource by: sean
No Comments
29 Feb
Trying to figure out how to write a test based on screen scraping. Easiest example is to make sure that certain URIs redirect to the login screen. Created an “automated” dir under app/tests/cases/, with a file called permissions.test.php: <?php class PermissionsTestCase extends CakeWebTestCase { var $mysite = “http://test.mysite.com”; function setUp() { } function tearDown() { [...]
Posted in Linux/Unix/OpenSource, Personal by: sean
No Comments
29 Feb
Testing models is straightforward, see http://bakery.cakephp.org/articles/view/testing-models-with-cakephp-1-2-test-suite Testing a controller though… Why is there nothing good out there that tells you how to test a controller, other than references to Felix’s work that doesn’t use simpletest? That said, testing a controller should look something like – Create controller object – Call an action – Poke at [...]
Posted in Linux/Unix/OpenSource, Personal by: sean
2 Comments
25 Dec
I’m giving 2 talks on using Wireshark to expose VoIP problems at Sharkfest ’08 (schedule).Details are sketchy, I think one of the talks is more of a hands on lab, the other is me talking. I’ve expanded on my techniques from the Linux Journal article I wrote on the topic. Some other fascinating topics going [...]
Posted in Linux/Unix/OpenSource by: sean
No Comments
24 Nov
I’ve often had a dim view of web frameworks. At b5media we had more than one case where we’d send out some pretty basic development to be done, and we’d get it back, done in a framework that took more time to get running than it was worth. And, from a performance perspective, all that [...]
Posted in Linux/Unix/OpenSource, Personal by: sean
No Comments
14 Nov
I understand how to work within the MVC (model, view, controller) system of development, but once I read skinny controller, fat model I realized what it’s all about. Even though it’s written for Ruby on Rails it’s easy enough to transport to your framework of choice. I’ve heard the term “fat model” before, but really [...]
Posted in Linux/Unix/OpenSource by: sean
11 Comments
04 Nov
I’ve been learning the CakePHP framework recently, and came to need a simple user login system. Judging by the documentation out there, ACLs are the way to do it. However after spending an hour trying to figure out all the contradicting articles out there I gave up. ACLs are very precise, all I need is [...]
Posted in Linux/Unix/OpenSource by: sean
No Comments
16 Sep
After my previous post I ended up wiping my Myth box and installing Mythdora. Apparently there are some unresolved issues in F7′s kernel and the ivtv packaging. Everything worked well except recording was funny. Watching livetv was jumpy… Every few seconds the audio and video would stutter. Watching a show on the MVP downstairs was [...]
Posted in Linux/Unix/OpenSource by: sean
No Comments
03 Sep
My MythTV box was sadly out of date, and to use the new scheduling service I needed to upgrade. DVD problems prevented me from upgrading from the DVD I downloaded. Luckily I found how to use the PXE image on the DVD to boot. It’s pretty nifty, you point your bootloader at the PXE images [...]
Posted in Linux/Unix/OpenSource by: sean
1 Comment
27 Jul
I’ve had some problems with Apache and I’d like a core dump when it happens so I can get a backtrace. It’s harder than you think. Red Hat has 2 documents on it: this and that. The summary of those is to add CoreDumpDirectory /var/apache-dump to httpd.conf, and make that directory 777. Then, edit some [...]