Jul
My first github project!
by jon beebe in Software, Web Development
Dynamic page head
Over the past few years I’ve had a need for dynamically adding/modifying the html <head> element as php builds pages. I created a singleton object for this purpose, and I’ve finally massaged the code to a point where it’s ready to release into the wild. My dynamic page head class comes with some convenient features such as:
- Add linked js/css and inline scripts and styles
- Optionally render javascript to the bottom of the DOM, as Yahoo’s YSlow recommends
- Merge files together, reducing requests to the server
- Minimize css with csstidy or YUI Compressor
- Minimize javascript with jsmin or YUI Compressor
- Optionally include/exclude any css or js asset from merging/minimization
- This is useful when including items such as TinyMCE, which uses javascript to include other assets. Minimization will break relative references to these items because the TinyMCE script will, mosty likely, not live in the same directory once minimized.
- Convenience functions for certain items such as nocache metadata
- Operate in xhtml (default) or html mode, rendering valid markup for either
May
Battery always 0% in Ubuntu 10.04
Update, 22 May, 2010. While the fix below was working for a while, it eventually stopped as well. Then I came across this article at Apple. Evidently, when the battery reports 0%, it is a hardware error and the System Management Controller must be reset. It’s quite simple: Keep reading »
May
Instal Ubuntu 10.04, single boot, MacBook
by ubuntu productivity in Linux
I just installed Ubuntu Lucid 10.04 on my white MacBook 2,1. Everything is working flawlessly :)
I wanted to write this, though, to share how I got it working, because there are many differing opinions on how to install Ubuntu as the only OS on a Mac. Keep reading »
Aug
Wine on Ubuntu outperforms Windows
by ubuntu productivity in Linux
AnandTech ran an interesting (and VERY thorough) review of Ubuntu 8.04. I wanted to highlight my favorite section.
Titled CPU Benchmarks, they test applications running on both Windows Vista and Ubuntu. The amazing thing is the applications running on Ubuntu via Wine performed better than they did on Windows!
Let’s let that sink in for a moment…the open-source project written ½ by volunteers and ½ by commercial interests, intended to duplicate the Windows API on Linux, actually outperforms the software it’s intended to mimic. That’s amazing to me. Keep reading »
Aug
GoogleDocs integration with Nautilus
I’m really looking forward to this project maturing: Nautilus support for Google Docs.
During his 12 weeks at Google’s Summer of Code this developer managed to integrate Google Doc’s cloud with Nautilus, so all your docs can be browsed and edited on Linux just like normal documents. This is how I imagined cloud computing working, where the document can be accessed both locally and remotely, and all the cloud docs can be easily backed up like any other file on your system.
I’m particularly interested in the fact that all the docs appear as OpenOffice files.
Aug
gPHPEdit 0.9.91 on Ubuntu 9.04
I am excited to see that gPHPEdit is now under active development again. I downoaded the Feb 9, 2009 snapshot and tried compiling it.
At first I was given the error that the following libraries were not installed:
gtk+-2.0 libgnomeui-2.0 gnome-vfs-2.0 libgtkhtml-2.0
So I ran these commands to install them:
sudo apt-get install libgtk2.0-dev sudo apt-get install libgnomeui-dev
Then navigate to the source directory and run these commands in your terminal:
cd gphpedit ./configure make sudo make install
Here is gPHPEdit 0.9.91 running on Ubuntu 9.04 :)
Aug
Read/Write to hfs+ on Ubuntu
by ubuntu productivity in Linux
Recently I re-configured my setup for more convenient dual-booting between Mac OS & Ubuntu Linux. I created a common hfs+ partition that both Ubuntu and Mac OS share, and this is my main storage for my work.
It took a bit of finagling to get Ubuntu Linux writing to the hfs+ drive, so I wanted to share my experience for those who might benefit from it.
Furthermore, I experienced a wierd issue where, while running Ubuntu my computer improperly shut down, and the hfs+ drive was no longer writeable. Below is how I fixed that.
Setup
Mac OS Leopard on hfs+ journaled partition
Ubuntu 9.04 on ext4 partition
Common hfs+ (unjournaled) partition for sharing data
Prepare Ubuntu
I found everything I needed to mount an hfs+ drive already installed on Ubuntu. But write support was not working be default. So I edited my /etc/fstab to include this as the last item, and it mounts the drive with read/write permissions.
/dev/sda3 /mnt/common hfsplus user,auto,uid=1000,gid=1000 0 0
From what I found about fstab, here’s what all that means:
- “/dev/sda3” is the path to the drive’s partition
- “/mnt/common” is the location I want to mount the drive at
- “hfsplus” is the partition type
- “user” allows a normal user (not just root) to mount this drive
- “auto” means mount automatically when booting
- “uid” is my user’s id, allowing it access to this mount point
- “gid” is my user’s group id, allowing that group access to this mount point
- The two zeros at the end…
- zero 1 is the dump option: “should this be backed up?” Zero means “no”
- zero 2 is the order in which fsck should check the filesystems. Zero means “don’t check”
One caveat, I had to adjust the permissions on all files that I want read & write access to in both operating systems. Otherwise, when Ubuntu saved a file, OS X only had read permission, and vise-versa.
Here’s the command that recursively sets permissions an all files in the common drive to 777:
sudo chmod -R 777 /mnt/common
Fix hfs+ read/write when improperly shut down
Once, after hibernating my computer in Ubuntu, it would not wake up, so I force-restarted. Evidently this caused the common partition to have an improperly-unmounted flag that would not let Ubuntu write to it. After booting into OS X and restarting into Ubuntu, it worked. I guess booting into Mac OS reset that flag…but I’m not entirely sure. But it did fix my read/write access to my hfs+ partition :)
Jul
Meld redux
Meld is, by far, the best diff viewer & editor that I have used. Earlier I posted about getting Meld up and running on OSX and overcoming a couple of issues. With the current version of MacPorts (1.7.1) and Meld 1.2, it’s much easier :) Keep reading »
Jun
AMD steals $1.45 billion from rival Intel
by jon beebe in Thoughts
I recently came across a Yahoo Finance article about Intel’s $1.45 Billion fine in Europe. In it was this:
“The fine against the world’s biggest chip maker represents a huge victory for Intel’s Silicon Valley rival, Advanced Micro Devices Inc., or AMD, the No. 2 supplier of microprocessors to PC makers.”
Let’s contemplate what this “victory” really means.
Intel invests its resources into some of the best and brightest minds in the world. Intel applies itself, and as Capitalism Magazine recognizes “a market for computer chips would not exist at all if Intel did not invent, develop, and constantly innovate the chips that become the brains of computers.” Anyone in the industry can recognize the effect Intel has had on the landscape. To my mind AMD should be thanking Intel for the amazing marketplace, and opportunity, that their pioneering efforts have created.
Instead AMD submits Intel to the looting European Union by suing Intel and lobbying regulators for the past 5 years. The result: the EU is stealing $1.45 billion from Intel. Money that Intel won by selling it’s innovations to consumers who freely paid for them.
Why is all this happening? Neelie Kroes, the EU Competition Commissioner, said “Intel did not compete fairly, frustrating innovation and reducing consumer welfare in the process.” These “unfair” tactics include offering rebates to big customers, a common practice of any business wishing to entice more. The EU requests of Intel were so vague that they left Intel “mystified” about what it should change.
But the real kicker in all of this is what AMD has done to itself and to all who value freedom. Instead of fighting the looters alongside Intel, as it should have done, it feed them to lions. AMD has helped to usher in a dystopian Atlas Shrugged style world in which the best and brightest among us must work for free so the looting masses can feast on their efforts.
I wonder, what will Dirk Meyer, AMD’s Chief Executive who said this decision was “an important step toward establishing a truly competitive market,” be saying when the looters come after him?
Sources
- Yahoo Finance: http://finance.yahoo.com/news/Record-euro106-billion-EU-apf-15225753.html
- Capitalism Magazine: http://www.capmag.com/article.asp?ID=5564
Jun
French Police save with Ubuntu
by ubuntu productivity in Linux
Here is a great article describing how the French Police saved money with Ubuntu. It starts out by saying
“France’s Gendarmerie Nationale, the country’s national police force, says it has saved millions of dollars by migrating its desktop software infrastructure away from Microsoft Windows and replacing it with the Ubuntu Linux distribution.”
“…has saved up to €50 million on licensing and maintenance costs as a result of the migration strategy”
“The Gendarmerie migration also demonstrates the significant cost savings that governments can get from adopting open source software. As the global financial downturn continues to put pressure on budgets, governments are going to increasingly look to open source software as a way to cut IT costs. We have recently seen moves in this direction from Canada and the UK.”
I found it interesting that they state the biggest difference between Ubuntu and Windows, from their point of view, was the icons
“Moving from XP to Ubuntu, however, proved very easy. The two biggest differences are the icons and the games. Games are not our priority.”
I am also very encouraged that they’re concerned about open standards. I wish more businesses and institutions though this way and I hope the Gendarmerie’s example promulgate open standards.
“[The Gendarmerie] has found that open source software is better at handling open standards.”

