29
Jul

My first github project!

Dynamic page head

Over the past few years I’ve had a need for dynam­i­cally adding/modifying the html <head> ele­ment as php builds pages. I cre­ated a sin­gle­ton object for this pur­pose, and I’ve finally mas­saged the code to a point where it’s ready to release into the wild. My dynamic page head class comes with some con­ve­nient fea­tures such as:

  • Add linked js/css and inline scripts and styles
  • Option­ally ren­der javascript to the bot­tom of the DOM, as Yahoo’s YSlow recommends
  • Merge files together, reduc­ing requests to the server
  • Min­i­mize css with csstidy or YUI Com­pres­sor
  • Min­i­mize javascript with jsmin or YUI Com­pres­sor
  • Option­ally include/exclude any css or js asset from merging/minimization
    • This is use­ful when includ­ing items such as TinyMCE, which uses javascript to include other assets. Min­i­miza­tion will break rel­a­tive ref­er­ences to these items because the TinyMCE script will, mosty likely, not live in the same direc­tory once minimized.
  • Con­ve­nience func­tions for cer­tain items such as nocache metadata
  • Oper­ate in xhtml (default) or html mode, ren­der­ing valid markup for either

Check it out at github

18
May

Battery always 0% in Ubuntu 10.04

by ubuntu productivity in Computers, Linux

Update, 22 May, 2010. While the fix below was work­ing for a while, it even­tu­ally stopped as well. Then I came across this arti­cle at Apple. Evi­dently, when the bat­tery reports 0%, it is a hard­ware error and the Sys­tem Man­age­ment Con­troller must be reset. It’s quite sim­ple: Keep read­ing »

8
May

Instal Ubuntu 10.04, single boot, MacBook

by ubuntu productivity in Linux

I just installed Ubuntu Lucid 10.04 on my white Mac­Book 2,1. Every­thing is work­ing flawlessly :)

I wanted to write this, though, to share how I got it work­ing, because there are many dif­fer­ing opin­ions on how to install Ubuntu as the only OS on a Mac. Keep read­ing »

26
Aug

Wine on Ubuntu outperforms Windows

by ubuntu productivity in Linux

AnandTech ran an inter­est­ing (and VERY thor­ough) review of Ubuntu 8.04. I wanted to high­light my favorite sec­tion.

Titled CPU Bench­marks, they test appli­ca­tions run­ning on both Win­dows Vista and Ubuntu. The amaz­ing thing is the appli­ca­tions run­ning on Ubuntu via Wine per­formed bet­ter than they did on Windows!

Let’s let that sink in for a moment…the open-source project writ­ten ½ by vol­un­teers and ½ by com­mer­cial inter­ests, intended to dupli­cate the Win­dows API on Linux, actu­ally out­per­forms the soft­ware it’s intended to mimic. That’s amaz­ing to me. Keep read­ing »

24
Aug

GoogleDocs integration with Nautilus

by ubuntu productivity in Linux

I’m really look­ing for­ward to this project matur­ing: Nau­tilus sup­port for Google Docs.

Dur­ing his 12 weeks at Google’s Sum­mer of Code this devel­oper man­aged to inte­grate Google Doc’s cloud with Nau­tilus, so all your docs can be browsed and edited on Linux just like nor­mal doc­u­ments. This is how I imag­ined cloud com­put­ing work­ing, where the doc­u­ment can be accessed both locally and remotely, and all the cloud docs can be eas­ily backed up like any other file on your system.

I’m par­tic­u­larly inter­ested in the fact that all the docs appear as OpenOf­fice files.

19
Aug

gPHPEdit 0.9.91 on Ubuntu 9.04

by ubuntu productivity in Linux, Software

I am excited to see that gPH­PEdit is now under active devel­op­ment again. I downoaded the Feb 9, 2009 snap­shot and tried com­pil­ing it.

At first I was given the error that the fol­low­ing libraries were not installed:

gtk+-2.0
libgnomeui-2.0
gnome-vfs-2.0
libgtkhtml-2.0

So I ran these com­mands to install them:

sudo apt-get install libgtk2.0-dev
sudo apt-get install libgnomeui-dev

Then nav­i­gate to the source direc­tory and run these com­mands in your terminal:

cd gphpedit
./configure
make
sudo make install

Here is gPH­PEdit 0.9.91 run­ning on Ubuntu 9.04 :)

gPHPEdit 0.9.91 running on Ubuntu 9.04

gPH­PEdit 0.9.91 run­ning on Ubuntu 9.04

17
Aug

Read/Write to hfs+ on Ubuntu

by ubuntu productivity in Linux

Recently I re-configured my setup for more con­ve­nient dual-booting between Mac OS & Ubuntu Linux. I cre­ated a com­mon hfs+ par­ti­tion that both Ubuntu and Mac OS share, and this is my main stor­age for my work.

It took a bit of finagling to get Ubuntu Linux writ­ing to the hfs+ drive, so I wanted to share my expe­ri­ence for those who might ben­e­fit from it.

Fur­ther­more, I expe­ri­enced a wierd issue where, while run­ning Ubuntu my com­puter improp­erly shut down, and the hfs+ drive was no longer write­able. Below is how I fixed that.

Setup

Mac OS Leop­ard on hfs+ jour­naled partition

Ubuntu 9.04 on ext4 partition

Com­mon hfs+ (unjour­naled) par­ti­tion for shar­ing data

Pre­pare Ubuntu

I found every­thing I needed to mount an hfs+ drive already installed on Ubuntu. But write sup­port was not work­ing 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:

  1. /dev/sda3” is the path to the drive’s partition
  2. /mnt/common” is the loca­tion I want to mount the drive at
  3. hfs­plus” is the par­ti­tion type
  4. user” allows a nor­mal user (not just root) to mount this drive
  5. auto” means mount auto­mat­i­cally when booting
  6. uid” is my user’s id, allow­ing it access to this mount point
  7. gid” is my user’s group id, allow­ing that group access to this mount point
  8. The two zeros at the end…
    1. zero 1 is the dump option: “should this be backed up?” Zero means “no”
    2. zero 2 is the order in which fsck should check the filesys­tems. Zero means “don’t check”

One caveat, I had to adjust the per­mis­sions on all files that I want read & write access to in both oper­at­ing sys­tems. Oth­er­wise, when Ubuntu saved a file, OS X only had read per­mis­sion, and vise-versa.

Here’s the com­mand that recur­sively sets per­mis­sions an all files in the com­mon drive to 777:

sudo chmod -R 777 /mnt/common

Fix hfs+ read/write when improp­erly shut down

Once, after hiber­nat­ing my com­puter in Ubuntu, it would not wake up, so I force-restarted. Evi­dently this caused the com­mon par­ti­tion to have an improperly-unmounted flag that would not let Ubuntu write to it. After boot­ing into OS X and restart­ing into Ubuntu, it worked. I guess boot­ing into Mac OS reset that flag…but I’m not entirely sure. But it did fix my read/write access to my hfs+ partition :)

14
Jul

Meld redux

by ubuntu productivity in Linux, Mac OS, Software

Meld is, by far, the best diff viewer & edi­tor that I have used. Ear­lier I posted about get­ting Meld up and run­ning on OSX and over­com­ing a cou­ple of issues. With the cur­rent ver­sion of Mac­Ports (1.7.1) and Meld 1.2, it’s much eas­ier :) Keep read­ing »

28
Jun

AMD steals $1.45 billion from rival Intel

by jon beebe in Thoughts

I recently came across a Yahoo Finance arti­cle about Intel’s $1.45 Bil­lion fine in Europe. In it was this:

The fine against the world’s biggest chip maker rep­re­sents a huge vic­tory for Intel’s Sil­i­con Val­ley rival, Advanced Micro Devices Inc., or AMD, the No. 2 sup­plier of micro­proces­sors to PC makers.”

Let’s con­tem­plate what this “vic­tory” really means.

Intel invests its resources into some of the best and bright­est minds in the world. Intel applies itself, and as Cap­i­tal­ism Mag­a­zine rec­og­nizes “a mar­ket for com­puter chips would not exist at all if Intel did not invent, develop, and con­stantly inno­vate the chips that become the brains of com­put­ers.” Any­one in the indus­try can rec­og­nize the effect Intel has had on the land­scape. To my mind AMD should be thank­ing Intel for the amaz­ing mar­ket­place, and oppor­tu­nity, that their pio­neer­ing efforts have created.

Instead AMD sub­mits Intel to the loot­ing Euro­pean Union by suing Intel and lob­by­ing reg­u­la­tors for the past 5 years. The result: the EU is steal­ing $1.45 bil­lion from Intel. Money that Intel won by sell­ing it’s inno­va­tions to con­sumers who freely paid for them.

Why is all this hap­pen­ing? Neelie Kroes, the EU Com­pe­ti­tion Com­mis­sioner, said “Intel did not com­pete fairly, frus­trat­ing inno­va­tion and reduc­ing con­sumer wel­fare in the process.” These “unfair” tac­tics include offer­ing rebates to big cus­tomers, a com­mon prac­tice of any busi­ness wish­ing to entice more. The EU requests of Intel were so vague that they left Intel “mys­ti­fied” 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 free­dom. Instead of fight­ing the loot­ers along­side 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 bright­est among us must work for free so the loot­ing masses can feast on their efforts.

I won­der, what will Dirk Meyer, AMD’s Chief Exec­u­tive who said this deci­sion was “an impor­tant step toward estab­lish­ing a truly com­pet­i­tive mar­ket,” be say­ing when the loot­ers come after him?


Sources

2
Jun

French Police save with Ubuntu

by ubuntu productivity in Linux

Here is a great arti­cle describ­ing how the French Police saved money with Ubuntu. It starts out by saying

France’s Gen­darmerie Nationale, the country’s national police force, says it has saved mil­lions of dol­lars by migrat­ing its desk­top soft­ware infra­struc­ture away from Microsoft Win­dows and replac­ing it with the Ubuntu Linux distribution.”

…has saved up to €50 mil­lion on licens­ing and main­te­nance costs as a result of the migra­tion strategy”

The Gen­darmerie migra­tion also demon­strates the sig­nif­i­cant cost sav­ings that gov­ern­ments can get from adopt­ing open source soft­ware. As the global finan­cial down­turn con­tin­ues to put pres­sure on bud­gets, gov­ern­ments are going to increas­ingly look to open source soft­ware as a way to cut IT costs. We have recently seen moves in this direc­tion from Canada and the UK.”

I found it inter­est­ing that they state the biggest dif­fer­ence between Ubuntu and Win­dows, from their point of view, was the icons

Mov­ing from XP to Ubuntu, how­ever, proved very easy. The two biggest dif­fer­ences are the icons and the games. Games are not our priority.”

I am also very encour­aged that they’re con­cerned about open stan­dards. I wish more busi­nesses and insti­tu­tions though this way and I hope the Gendarmerie’s exam­ple pro­mul­gate open standards.

[The Gendarmerie] has found that open source soft­ware is bet­ter at han­dling open standards.”

Switch to our mobile site