Setup Symfony on Mac OS X (using MAMP)

May 10th, 2009

symfony
Symfony doesn’t play well with the default OS X server setup, so you will need an alternative setup. This tutorial assumes you are using MAMP but XAMPP is also an option.

This tutorial will get a server up and running that works with Symfony and allow you to access your projects from http://ProjectName.localhost/
Read more…

Computers, Guides, Programming , , , , , , ,

Symfony + Mac OS X + pdo_mysql.so

April 27th, 2009
UPDATE!
May 10th, 2009 – This tutorial is not complete. Following these instructions will only get command line version of PDO_MYSQL working. I have written a new guide that avoids the built-in versions of PHP and Apache. Read the updated tutorial »

I recently started working my way into the world of the PHP framework Symfony. While following the superb Jobeet tutorial, I encountered an error involving PDO_MYSQL and Mac OS X. I spent an hour trying to trace down the problem and another hour finding a solution. And as always, when something takes me too long to solve, I write a guide for it!
Read more…

Computers, Guides, Programming , , , , , ,

Easy Website on Your University of Oregon Web Space

February 1st, 2009

Wordpress on Your University of Oregon Web Space

NOTE: shell.uoregon.edu is now sftp.uoregon.edu

Ever wanted to have your own webpage at http://uoregon.edu/~YourDuckID? Ever wanted to setup a clean-looking, easy-to-maintain website for a student group your are associated with? Well now the whole process is a snap! Every University of Oregon student is given space to set up their own website.

It’s a fairly complex process to set up all the necessary tools (PHP and MySQL) manually, so I wrote a program to do it for you (mostly) automatically! All you need to do is login to your uoregon.edu account and follow a couple simple instructions.

Read more…

College, Computers, Guides, Programming, Wordpress , , , , , ,

Creating a MediaWiki API Instance Outside Installation Directory

January 11th, 2009

I’m in the process of writing mediawiki2wordpress—a plugin to allow WordPress to access and display content from a MediaWiki installation. I spent a bit of the evening figuring out how to get MediaWiki to let me trick it into thinking I was making a standard request.

The method I explain here gives you access to the MediaWiki API class as opposed to the standard MediaWiki rendering class. Most of this code came from MediaWiki’s api.php which you can find in MediaWiki 1.13.

Here’s what the API output will look like for the Foobar page on Wikipedia (in XML).

I spent quite a bit of time poking around in the MediaWiki /includes directory and trying different hack-ish methods before this page that had exactly what I needed! It did need updating, but I was happy to oblige. I even had this whole post written up using a sloppier approach before finding the FauxRequest class that I explain below.
Read more…

Featured, Guides, Photography, Programming, Wordpress , , , , ,

Quicksilver Trigger: “Show Current Track” in iTunes

January 8th, 2009

A while back I throw together this AppleScript to trigger Quicksilver to not only go to iTunes, but to automatically focus on the current track. (Note: When iTunes is already the front window, the command to do this is ⌘L.

Features

  • Brings iTunes to the front if it isn’t already the front window
  • Highlights the track that is currently playing (if one is playing)
  • If iTunes is already the front window, this script will hide the window (similar to using ⌘H

Read more…

Computers, Featured, Guides, Programming , , , ,

Setting Up Apache, MySQL and PHP on OS X Leopard

January 3rd, 2009

mampI recently had to setup MySQL on Mac OS X Leopard (I was using 10.5.6). I can never find a guide that gets Apache, MySQL and PHP working using the binaries that come packaged with Leopard. I also don’t like using pre-packaged installers like XAMPP and MAMP. This guide is intended for advanced users as very little explanation is given for each step.

Please add a comment if you have any suggestions for improvement.

Read more…

Computers, Featured, Guides , , , , , ,

Hackintosh 2.0

December 23rd, 2008

apple-logoAfter spilling water through the fan vents of my desktop on my current hackintosh, I had to make a new one. All that needed replacing was the motherboard. I wanted to pick a board that had been put through it’s paces in the OSx86 (hackintosh) community. There was an amazing guide for the first board I picked, but it wasn’t being sold on Newegg.com anymore, so I decided on the Gigabyte GA-EP45-UD3P.

You can find more information about my setup on my hackintosh v2 wiki page. If you want to see every step I went through to get this system working, check out that page.

What To Expect

This guide will let you install OS X Leopard 10.5.6 from the retail disk (straight from Apple!). You’ll have a system with full functionality and minimal hacking.

I have not tested this setup extensively since I got it working, so I make no guaranty about it’s stability. The way I went about it isn’t the cleanest, but it works. I’m hoping weaksauce12 will release a Universal OSx86 Installer plug-in for this board in the near future. Keep an eye out on my blog for another post involving that installation.
Read more…

Computers, Guides , , ,

The Climate Lottery

October 5th, 2008
Climate Lottery
Photo by nickhall

While reading an article on The Thirteen Tipping Points of global warming for my environmental studies class, I took notice of one hypothetical solution to make people more active in combating global warming: A public lottery.

The article starts by informing readers that democratic, cooperative species tend to survive through the millennium. This is contrary to some economic theory which suggests that humans will only ever act in their own self-interest.

It also cites a game theory experiment in which greater success is obtained by the group as a whole when all participants can see how much each player is contributing to the communal “pot”:

A recent study hints at the evolution of altruism. A team of Swiss and American mathematicians and population biologists ran a variant of game theory known as a public goods game, in which players contribute money to a common pot that an experimenter doubles, divides evenly, and returns to the players. In ordinary play, if all players contribute all their money, everyone wins big. If one player cheats, everyone wins small. If an altruist and a cheater go head-to-head, the cheater wins consistently. This paradox is known as the Tragedy of the Commons.

But in the new computer variant, population dynamics were introduced into the game. Players were divided into small groups that played among themselves. Each player eventually “reproduced” in proportion to the payoff received from play—thereby passing her cooperator or cheater strategy to her offspring. Mutations and dispersions were introduced, creating a shifting population of individuals divided into groups of changing sizes and allegiances.

After 100,000 generations, the results were surprising. Rather than succumbing to the cheaters, the
cooperators overwhelmed them.

Read more…

Environment , ,

The Corporation: To-do List

October 4th, 2008
The Corporation
Watch the Corporation

I just finished watching a documentary called The Corporation, an intriguing look at the modern day exploits of global corporations. I wanted to quickly mention a couple points that I found particularly interesting:

  • For all legal purposes, corporations are considered a person
  • Being a person, corporations are allowed to give campaign constitutions because it is free speech
  • Before 1987, the patent office clearly stated that it was not legal to patent any living thing. After a misguided supreme court ruling stating that a bacteria looked more like a chemical than a bug, a corporation was allowed to copyright that bacteria. The ruling now states that you can patent any living thing in the world except a full birth human being.

The end of the documentary gives a list of things we can do to remedy the issues that are posed by modern corporations:

  • End corporate personhood
  • Put people before profit
  • Build economic democracy
  • Use full-cost accounting
  • Read more…

Environment

Enlightened Photography

January 9th, 2008
Curiosity
Photo by Kazze

Seize the moment of excited curiosity on any subject to solve your doubts; for if you let it pass, the desire may never return, and you may remain in ignorance.
-William Wirt

Ever since I first ran across this jewel of advice, I have always made an effort to apply it to my life. Whenever my interest in a certain subject flares, I make a point to explore it before my focus has a chance to shift elsewhere.

As of late, my excitement and curiosity have revolved around photography. I bought a Nikon D40 in June and have since only put it to good use on occasion. Since I purchased it, I’ve had a nagging sense that my photos weren’t turning out as interesting or “professional looking” as those taken by my friends who are amateur photographers. Part of this has to do with the fact that I’m not always as creative as I’d like. I also knew the source of my displeasure wasn’t the fact that I have an entry-level Nikon, because I’ve been told time and time again that the camera doesn’t matter.

Read more…

Life, Photography