Archive for the ‘Uncategorized’ category

SVN Switch and Relocate Everything

July 22nd, 2010

We recently had a server DNS name change that affected our main SVN repository server, and required every checkout to be svn switch –relocate ‘ed.

In Eclipse I have every project checked out in ~/workspace/ so every directory with the matching server root would need to be switched. This shell script handled all the svn switch –relocate statements for me. Replace oldservername and newservername.

for dir in `ls -1 */.svn/entries | xargs grep -H -l oldservername | grep -E -o "^[^\/]+"`; do
svn switch --relocate `svn info $dir | grep ^Repository\ Root | cut -f 3 -d ' '` `svn info $dir | grep ^Repository\ Root | cut -f 3 -d ' ' | sed 's/oldservername/newservername/'` $dir
done

It may be best to make a backup of your project directories, especially if you have local uncommitted changes. This script works on bash-like command lines, such as Mac OS X.

On Experience

February 15th, 2010

I came across an interesting quote on experience which made me think about those that disclose how long they’ve worked in a field (myself included of course). The context in which I’m thinking about this is a bit different than the author which was ‘the trades’ and apprenticeship, but, food for thought nonetheless. :-)

“When the Union Delegates called upon me to insist that none but men who had seven years’ apprenticeship should be employed in the works, I told them that I preferred employing a man who had acquired the requisite mechanical skill in two years rather than another who was so stupid as to require seven years’ teaching. The delegates regarded this statement as preposterous and heretical. In fact, it was high treason. But in the long run we carried our point.”

James Nasmyth: Engineer; an autobiography by James Nasmyth

Blog updated.

October 25th, 2009

Just converted the old blog to Wordpress, and now you can call me a hypocrite.

Lincoln, NE PHP Meetup

January 6th, 2009

Tonight, Tuesday January 6th 2009 at 6:30 PM in Yia Yia’s. I’ll try and wear my bright GREEN PHP Appalachia shirt so I should be easily recognizable.

Meetup if you’re interested.

Installing the Validator from CVS on Ubuntu

September 4th, 2007

Here are some notes on installing the validator, so you can test and work with the CVS version on Ubuntu Linux.

On my machine I use Eclipse which stores files in ~/workspace/ – all of my paths are based off of this, and I add an alias to apache so that all my eclipse projects are available at http://localhost/workspace/{project}

For my setup, I have checked out the validator source code in ~/workspace/validator/ which shows up at http://localhost/workspace/validator/. Modify the paths if your CVS checkout is in a different location.

To get a snapshot of the latest files for the validator you can use:
cvs -d :pserver:anonymous:anonymous@dev.w3.org:/sources/public checkout validator, which will create a validator directory with the latest files.

Make sure your apache configuration has includes enabled, and will process the cgi script — modify the /etc/apache2/apache2.conf file — sudo nano /etc/apache2/apache2.conf, and add the following:

# This is the directory where you have the validator's "check"
# script as well as its and *.html, *.css etc files.

<Directory /home/bbieber/workspace/validator/htdocs>
Options ExecCGI IncludesNOEXEC Indexes MultiViews FollowSymlinks
AllowOverride None
AddHandler server-parsed .html
AddCharset utf-8 .html
</Directory>

# Tell httpd that "check" is a CGI script.

<Location "/workspace/validator/htdocs/check">
SetHandler cgi-script
</Location>

Then, in the CVS files you have checked out, symbolically link the ‘check’ file within the htdocs directory:

cd htdocs
ln -s ../httpd/cgi-bin/check check

So that the file check -> ../httpd/cgi-bin/check


cd ../httpd
chmod +x check

Install the modules and dependencies:

sudo apt-get install opensp xmlto
sudo cpan install Config::General Encode::HanExtra Encode::JIS2K HTML::Encoding HTML::Template Test::Exception Class::Accessor Test::Builder Sub::Uplevel Test::Builder::Tester
wget http://superb-west.dl.sourceforge.net/sourceforge/openjade/OpenSP-1.5.2.tar.gz
gunzip OpenSP-1.5.2.tar.gz
tar -xvf OpenSP-1.5.2.tar
cd OpenSP-1.5.2
./configure
make
sudo make install
sudo cpan install SGML::Parser::OpenSP XML::LibXML Net::IP

I refuse to be a WP sellout.

May 11th, 2006

WP = WordPress.

And I refuse to use it. I’ve seen it’s features, it does have a decent template system, but I feel like 75% of it is feature overkill. Not to mention a ton of code which could be simplified by just using a few PEAR packages.

To those people that like it, that’s fine… go a head and use it. But I’m not interested in using some huge app for what should be a tiny blog system. I want something PEAR installable, uses PDO, PHP5 compliant, and most importantly – simple.

So I’m starting work on the salty blog system… it’s a derivative of my current site. It’ll have all the standard blog software bull: multi-users, commenting, categories, archives, fully customizable templates etc. But it’s not going to be huge, and it will be easy to install and upgrade.

It uses:

  • MDB2_Schema
  • DB_DataObject
  • Savant3
  • maybe FormBuilder

and most importantly, it will be PEAR installable and upgradable. I plan on using it here at home for my personal site, and at work to start documenting some of the work things I do and foster some communication between coworkers. So stay tuned if you care, or don’t – I don’t care…. but one things for sure.

I ain’t no WP sellout.

Well… it’s sure to go downhill from here.

September 11th, 2004

Ok folks… I’ve given in. Why not start my own wasteful blog to disclose my distaste of our worldly surroundings, and to share my overwhelming knowledge of all things useless.

Thank you for accompanying me on this journey, as we travel into the unknown.
….more will follow.

-Brett