October 25, 2011
Unit 1w, 2 Intelligent Agents

I liked a YouTube video: Unit 1w, 2 Intelligent Agents

October 22, 2011
Christoph Adami: Finding life we can't imagine

I liked a YouTube video: http://www.ted.com How do we search for alien life if it’s nothing like the life that we know? At TEDxUIUC Christoph Adami shows how he uses his research into…

October 21, 2011

Verizon could share the addresses of websites you visit, app usage and location of the phone. How to Opt-Out. http://t.co/9ci5SYJW

October 20, 2011
Mike Biddle: We can recycle plastic

I liked a YouTube video: http://www.ted.com Less than 10% of plastic trash is recycled — compared to almost 90% of metals — because of the massively complicated problem of finding and…

October 15, 2011

Top 10 socially networked colleges according to http://t.co/yhRCMakb. Indiana University is #6. http://t.co/FUHWKCSq

October 14, 2011

It’s about time for the USPS to be replaced by UPS. USPS delivers nothing but junk mail and fails to deliver important letters.

November 19, 2009
Listed 4 signed copies of Sarah Palin’s Going Rogue First Edition Hardcover. Signed in Fort Wayne on Nov. 19. http://bit.ly/PalinSignedEbay

November 18, 2009
Posted article on configuring PHP+MySQL+Apache for web development using Eclipse tools on Snow Leopard. http://bit.ly/SnowLeopardAMP

November 18, 2009
Running MySQL+PHP in Apache with Multiple Virtual Hosts on OSX 10.6 Snow Leopard

Here is a guide detailing how I set up Apache with PHP enabled (both already installed) and MySQL on a new installation of OSX Snow Leopard using the 64-bit versions. This guide shows how to create multiple virtual hosts each with it’s own root directory for serving relative paths. I wanted to leave http://localhost alone, displaying just a simple phpinfo(); index page so I know it’s running smoothly. I also wanted to create a custom local domain for each site I work on, such as http://sitename.localhost.com, which points to a root folder that I specify, such as /Users/josh/Work/sitename. Here is a full guide on setting up virtual domain hosts based on a directory structure, which is complex to set-up, but easy to add new sites. I also want to set-up a complete PHP development environment based on the Eclipse IDE.  Eclipse seems to be the most full featured IDE, with many plug-ins for everything you would want to do as a developer. Google supports Eclipse, so that says something, and virtually every programming language is supported, so you only need to learn a single IDE for everything. If you want to be more focused on a single project, there may be better Eclipse distros, or different editors, but I want an all around app that works on every operating system the same, so I can eventually start using Ubuntu or CentOS as a primary operating system. There must be more than a few tutorials out there that illustrate how to do this, but I just don’t know where to look. That said, I had a difficult time finding the answers using Google searches. Mostly, I found out of date versions based on older editions of OSX, all using terminal editors, and none that had everything I wanted to do in a single step-by-step guide, and that assumed that I have no prior experience. First download and install TextWrangler. This is a free, and great general tool for editing text files on Mac OSX, and it allows you to open hidden files of any extension with administrator permissions so that you can save the file, no terminal editing required. Do be sure to include the extra Terminal tools if prompted during installation. Path Finder is another handy GUI tool for file browsing, but is not free. I’m not going to copy and paste all the details in each case. Instead, I’ll just list the steps needed with some additional notes and the links to the full article containing the detailed steps and terminal commands. This document is a result of having everything running fine with MAMP installed, then wanting to actually figure it out for myself. Nothing seemed to work out of the box, I had to reinstall OSX several times to start from scratch after learning something new as to why nothing was working right. This is a really nice step-by-step guide to compiling everything from source. You install everything to a /usr/local directory structure and link the configs to each other. It may be all you need, but is also tedious, and difficult for a beginner. If you want to forgo installing MacPorts in the next steps, then here is the complete guide for installing PHP and MySQL on Snow Leopard using the pre-installed libraries. This may be a better option, but I like that MacPorts can update everything for me, and that it runs as separate installs from the base system, so if it gets hosed, it’s easy to redo. One thing you will want to do no matter how you install MySQL is avoid the 10.5 64-bit package, and compile it on your own. You’ll need XCode installed to compile, but I think it’s a necessity to have installed for any kind of development on a Mac, even if you never use the IDE. Here are some further resources for installing MySQL and configuring your system using the Snow Leopard stock modules and a more stock setup that installs to the /usr and system folders. The advantage to this method is that you’ll learn a lot more about your set-up, and be able to add more niche type features and fix strange errors. This will also lead to a more stable system since you’ll probably pick one set of versions, and leave it at that until the next major releases. You’ll likely need bits of each article to get fully functional, and probably best to go in this order, making sure that what you just compiled is actually working.

  1. Compile PHP, Apache and MySQL on Snow Leopard
  2. Compile and Install MySQL on Snow Leopard
  3. Configuring PHP and XDebug for MySQL
  4. Configuring PHP and Multiple Virtual Hosts on Apache
  5. Configure PHP, Virtual Hosts, and install phpMyAdmin
  6. Installing PEAR, PHPUnit and XDebug
  7. Installing PHP Extensions Imagick, Magickwand, Memcached, MCrypt
Switching from Bash to Z-Shell I came across a few blogs that mentioned how great the ZSH shell is. It’s already included in Snow Leopard. The great feature is the ability to customize the shell with some really nice features. To change the shell, just run this command in Terminal: $ chsh -s /bin/zsh . You can upgrade to the latest zsh version via MacPorts using the zsh-devel port. Installing a 64-bit Package Manager on Snow Leopard For installing MySQL 64-bit, MacPorts is a must. Some guides say you should use the OSX 10.5 .dmg from mysql.com, but you’ll have issues in 10.6. A nice GUI for MacPorts called Porticus is available, but some packages will fail unless run as sudo from the shell. You can download, compile and install the latest 64-bit MySQL for OSX 10.6 and keep it up to date with a few simple commands from MacPorts. To use MacPorts, you’ll have to install XCode from the Snow Leopard DVD or the ADC dowload. Here is a complete guide to installing Fink and MacPorts on Snow Leopard. Fink and the companion GUI, Fink Commander, is another option for managing 64-bit packages on OSX.
  1. Download and install the MacPorts Snow Leopard package.
  2. Run command: $ sudo port -v selfupdate
  3. Make sure that MacPorts is added to your PATH in the shell .profile
    1. export PATH=/opt/local/bin:$PATH 
  4. Force Macports to always compile for 64-bit
    1. Open /opt/local/etc/macports/macports.conf
    2. At line 59, change #build_arch i386 to build_arch x86_64
  5. Ports you may want to install
    1. subversion +mod_dav_svn +tools
    2. git-core +svn
Installing MySQL 5.1.40 64-bit via MacPorts MySQL is the only primary item not included in Snow Leopard. The easiest way to install and maintain is with MacPorts, unless you want to compile your own. The only difference I know of to MacPorts is that everything is installed by default to /opt/local instead of /usr/local. Otherwise everything is configured for you, and saves a lot of time for setting up a developer machine. Some common commands and aliases are listed. If you are getting connection refused errors, try rebooting. You could even reboot after every step, it can save you a day of Google searching for workarounds. These steps worked for me using a clean install of Snow Leopard 10.6. I give full credit for these steps to Robby and Chad for their guides that helped get everything running eventually. Start: % sudo /opt/local/share/mysql5/mysql/mysql.server start Stop: % /opt/local/bin/mysqladmin5 -u root -p shutdown Ping: % mysql5 -u root -pLaunch after reboot: % sudo launchctl load -w /Library/LaunchDaemons/org.macports.mysql5.plist Add the following aliases to your terminal profile to save typing long commands. You have to create and then edit the bash (~/.profile or ~/bash_profile) or zsh (~/.zprofile) profile config from command line with vi. To create a file just type: % sudo vi ~/.profile. Type i to insert new text, then type :w! to save, followed by :q to quit. alias mysqlstart=’sudo /opt/local/bin/mysqld_safe5 &’ alias mysqlstop=’/opt/local/bin/mysqladmin5 -u root -p shutdown’ alias mysqlping=’mysqladmin5 -u root -p ping’ PATH=$PATH:/usr/local/mysql/bin; export PATH
  1. Install MySQL developer libraries:
    1. % sudo port install msyql5-devel
    2. % sudo port install msyql5-devel-server
    3. optional alternative database servers: sqlite3, postgresql
  2. Reboot
  3. Create required MySQL system databases (service must be started)
    1. % sudo /opt/local/lib/mysql5/bin/mysql_install_db —user=mysql
  4. Set the root password, since the default is blank (service must be started)
    1. % mysqladmin -u root password NEWPASSWORD
  5. Copy a config template from MacPorts and change settings as needed
    1.  $ sudo cp /opt/local/share/mysql5/mysql/my-large.cnf /opt/local/etc/mysql5/my.cnf
If you get socket errors when trying to ping the server after starting with the command then, you may have to create a new file at /opt/local/etc/mysql5/my.cnf (just use sudo vi and the full path to create a new, empty file) and add these lines: [mysqld_safe] socket = /tmp/mysql.sock [client] socket = /tmp/mysql.sock MySQL has good GUI tools for doing basic tasks. Installing Apache 2.2 via MacPorts This is pretty simple with MacPorts.
  1. Run $ sudo port install apache2 
  2. Set the MacPorts Apache2 to load at startup
    1. sudo launchctl load -w /Library/LaunchDaemons/org.macports.apache2.plist
Installing PHP 5.3 via MacPorts I debated on whether I should use the php modules included with Snow Leopard, downloading and compiling from source, or using the MacPorts php5 port. In the end, it seemed easier to install the MacPorts, since I have limited experience, and I want to try out a number of features and extensions that are easier installed through MacPorts. Since I’m running MySQL from MacPorts, the PHP installer should configure everything nicely for me. To install all the variants for a M(Mac)AMP environment, you can use this command: $ sudo port install php5 +apache2 +pear +debug
  1. Activate PHP in Apache
    1. $ cd /opt/local/apache2/modules
    2. $ sudo /opt/local/apache2/bin/apxs -a -e -n “php5” libphp5.so
    3. $ sudo /opt/local/apache2/bin/apachectl -k graceful
    4. The web root is located at /opt/local/apache2/htdocs
    5. Use phpinfo() in index.php at the root and open http://localhost in Safari.
  2. Set default timezone in php.ini to Country/City
  3. Configure PEAR
  4. PHPUnit testing framework
  5. XDebug PHP Extension (howto)
  6. install optional ports: php5-xdebug, php5-curl, php5-mysql, php5-tidy, php5-web, php5-xsl
  7. install phpmyadmin web manager for MySQL
  8. install extra packages
    1. pecl install apc
    2. pecl install imagick
  9. Add Virtual Hosts
Installing Eclipse 3.5 SDK Galileo 64-bit Cocoa with plug-ins Download and install the Eclipse 3.5 SR1 .dmg package all-in-one from Eclipse.org. I linked to the Java JEE package so that I can do some work with Google App Engine at some point. Once Eclipse is installed, it is easy to install additional packages for other languages via the Help->Install software manager. It seems to help if you install the different Eclipse plug-in package groups separately from each other, and let Eclipse restart itself each time. Check out this guide for installing some popular PHP extensions onto your base install, and you should be able to figure out the rest.
    •  FireFox 3.5 Web Development tools
    The reason to use PHP with extensions and frameworks over something newer like Ruby on Rails generally has to do with the speed and scalability advantages of PHPFacebook runs on PHP, as does Flickr, and Twitter has made the switch from Ruby to Scala due to performance issues with Ruby, but is still using Ruby-on-Rails on the front-end. The truth is, that for new projects, PHP is better off with a framework underneath. The leading options are Zend Framework (the creators of PHP), CakePHP and Symphony. Check out this Google Trends graph for all the search activity in these frameworks. That’s about it. You now have a professional PHP development platform running on your shiny Mac with Snow Leopard.

    October 19, 2009
    Starting Ruby on Rails Development on Mac

    Today I decided it was time to start looking for a more open alternative to the Microsoft .Net platform and framework. It seems that Ruby on Rails has gained a lot of traction in the web development world, primarily on web start-ups and smaller shops at the moment. I run Apple’s OSX Snow Leopard, and I want a nice and simple IDE with version control that will be easy to set-up and use for the first time. I’ll also need a database storage server, which seems easy to choose (nice article here), since most roads lead to MySQL. In addition, MAMP (Macintosh, Apache, Mysql and PHP) is a nice tool for getting everything set up using a single installer. In beginning my search, I’ve found many differing opinions on what is best, fastest, or most widely used.

    This is my short list of software for developing Ruby on Rails web applications based on my perception of how often I read a recommendation for the software while searching.

    MacroMates TextMate (Denmark, $60)
    Aptana RadRails (Free, Open Source, based on Eclipse)
    Sun Micro NetBeans (Free, Open Source)
    JetBrains RubyMine ($99)
    Embarcadero 3rd Rail ($99)
    ActiveState Komodo ($245)
    Eclipse with a Plug-in (Free, Open Source)

    I’ll post a note shortly with the results of testing some trials, and working through a few examples.

    October 11, 2009

    Added a Wibiya toolbar to my blog, pretty nice feature. http://bit.ly/96C5g

    October 8, 2009
    Permies - Permaculture Forums

    A place to talk about permaculture, eco-building, organic practices, woodland care, and homesteading.

    October 8, 2009
    Subscribed to earthship

    I subscribed to earthship’s channel on YouTube.

    Liked posts on Tumblr: More liked posts »