Linuxfest Northwest 2011

Arriving at Bellingham Technical College a bit late, tired from late night geeking out on uBuntu. I arrive in a moist parking lot with a grungy overcast. I walk into “Build a Free As In Freedom Cloud” in Haskell 203 late. Old Spice should sponsor Linuxfest, the man next to me smelt of musk; as if he wrestled a bear into submission.

At 11am, Mark Hinkle took the stage discussing “Crash Course on Open Source Cloud Computing” – this man is a genius. Below is his slideshare.

During lunch, of course I opted for the ribs. I met an instructor at WWU and one of the computer science network admins (their names escape me.) It was interesting talking to them about distributed storage.

After lunch I sat in to listen to Adrian Pike’s Agile development concepts and practices for lean startups talk. It was interesting to hear his experience with project management and collaborating with people online. I think the most insightful bit of information was just how their team handles communication. He mentioned Kanban, Scrum, Basecamp, Test suites, etc.

Coincidentally the Amazon AWS talk was canceled. I am not sure why but I ran into two Amazon network technicals hanging out in the hall ways. I had to sit in on a Drupal talk which was semi informative.

The next thing that happened to me was sitting down next to an asian that had a Google Laptop CR-48. I later found out he actually works for Google and was sent to LinuxfestNW to sit in on the Cloud Networking talks. I’m assuming he’s an engineer. He was sitting with one of the Amazon network technicians. David Nalley talk about open source clouds was very informative and I’d love to experiment with the software he mentioned.

All in all, Linuxfest Northwest was just another nerdcore fest. It’s nice to meet / talk with others that understand the techno jargon.

uBuntu 11.04 On ASUS UL80j Laptop!

Running uBuntu 11.03 on ASUS UL80j

The ASUS UL80j is a light weight, ultra thin laptop that features Windows 7 Home Premium. It comes with an Intel i3 dual core 1.2ghz processor and 4GB of DDR3. Loading uBuntu 11.04 onto it was easy as cake. The laptop comes with a 500GB hard disk, I’ve split the partition 50-50.

Last week I began tinkering around with uBuntu 11.04 Beta before the official release, and I might say, this is the best release ever! I understand that veteran uBuntu users dislike the Unity interface, but I’ve grown to love it. Although I wish the task bar would be at the bottom. It is rather limiting being on the left hand side of the screen.

Issues At First

  • Unity GUI Does Not Work
  • Wifi LED Does Not Turn Off / On
  • Suspend / Hibernate Hangs
  • Runs Hot & Battery Doesn’t Last As Long As Win7

Getting Unity To Work

In order to get Unity to work properly I had to uninstall the Nvidia drivers. Once they were uninstalled, I restarted the system and Unity was up and running.

UPDATE: I’ve been digging around the uBuntu forums and found that the NVidia Optimus graphics card is not supported on uBuntu. There is a thread of customers complaining about the lack of support. If you stumbled upon this post and feel the need to raise your concerns, please visit Linux and Hybrid Graphics no Optimus support thread.

Fixing Wifi LED

If your blue Wifi LED light near your mouse pad isn’t working when you hit Fn + F2, here’s a quick fix. You will have to create two files and paste the following scripts.

[code lang=”bash”]sudo nano /etc/acpi/events/asus-wireless-switch[/code]

Paste the following code into this file:
[code lang=”bash”]event=hotkey ATKD 0000005d
action=/etc/acpi/asus-wireless-switch.sh[/code]

Next you will want to:
[code lang=”bash”]sudo nano /etc/acpi/asus-wireless-switch.sh[/code]

And paste this code into the file:
[code lang=”bash”]#!/bin/sh
# Toggle wireless device on Asus K52 laptops

WLANSTATUS=`cat /sys/class/ieee80211/phy*/rfkill*/state`

test -z $WLANSTATUS && exit 1

if [ $WLANSTATUS = 0 ]; then
echo 0 > /sys/devices/platform/asus_laptop/wlan
elif [ $WLANSTATUS = 1 ]; then
echo 1 > /sys/devices/platform/asus_laptop/wlan
fi[/code]

Next you will want to chmod +x asus-wireless-switch.sh and then restart acpi!

[code lang=”bash”]sudo chmod +x /etc/acpi/asus-wireless-switch.sh
sudo service acpid restart
sudo /etc/init.d/acpi-support restart[/code]

Fixing Suspend / Hibernation

My number one complaint wants Suspend / Hibernate. In order to resolve the Suspend / Hibernate issue, will have to create a file in /etc/pm/speed.d/. Note: For some reason, hibernate still doesn’t behave like I wish it would.

First create 20_custom_ehci_hcd in /etc/pm/sleep.d/
[code lang=”bash”]sudo nano /etc/pm/sleep.d/20_custom_ehci_hcd [/code]

Paste the following script and save.

[code lang=”bash”]
#!/bin/sh
# File: “/etc/pm/sleep.d/20_custom-ehci_hcd”.
case “${1}” in
hibernate|suspend)
# Unbind ehci_hcd for first device 0000:00:1a.0:
echo -n “0000:00:1a.0” | tee /sys/bus/pci/drivers/ehci_hcd/unbind
# Unbind ehci_hcd for second device 0000:00:1d.0:
echo -n “0000:00:1d.0” | tee /sys/bus/pci/drivers/ehci_hcd/unbind
;;
resume|thaw)
# Bind ehci_hcd for first device 0000:00:1a.0:
echo -n “0000:00:1a.0” | tee /sys/bus/pci/drivers/ehci_hcd/bind
# Bind ehci_hcd for second device 0000:00:1d.0:
echo -n “0000:00:1d.0″ | tee /sys/bus/pci/drivers/ehci_hcd/bind
;;
esac
[/code]

Now chmod +x the file.

[code lang=”bash”]sudo chmod +x 20_custom-ehci_hcd[/code]

Issues That Arise

Now that Suspend works fine, I’ve noticed if I keep my laptop on suspend for long periods of time the GUI won’t load upon wake up. The only work around I’ve figured out is to hit Ctrl + Alt + F1, login, and shutdown. Update: Another alternative to restarting the laptop is to restart gdm. Look below.

[code lang=”bash”]sudo shutdown -r now[/code]

If upon waking up and the GUI does not load hit Ctrl + Alt + F1. Type the following:

[code lang=”bash”]sudo /etc/init.d/gdm restart[/code]

Conclusion

With these simple fixes, I’m able to live with running uBuntu 11.04 on my ASUS UL80j. I have not been able to figure out a way to make the processor from running as hot as it does. I am thinking because the UL80j has two GPU’s (Intel & Nvidia Optimus), uBuntu automatically runs the Nvidia card instead of conserving power with the built in gpu. Another announce is the GUI not loading after the laptop has been in Suspend mode for over 24 hours.

De-laminating / Cracked DC MLF Snowboard

I’m very sad from this weekends epic adventures up at Mt. Baker Ski Resort. I came back with a cracked / de-laminating snowboard. I’ve only had this snowboard for 3 months and it is in pristine condition. There is only one ding in the edge, which was my fault. The actual de-laminating spot is near the binding is where a skiers edge cut the top layer and a little bit of the sidewall. I noticed there was a burr, so I removed it. I was mainly worried that the top layer would start pealing back. I noticed a crack on the top layer Sunday afternoon which spanned about 70% width of the board. I quickly jumped out of my bindings to inspect the crack. It seems to have spidered from that spot where the ding originally was and begun de-laminated. The resin layer in between the sidewall / core and the top layer is flaking. I figured I’d start looking into warranty options, but I have a feeling it might not be honored.

Looking at the DC Snow Policy page, there is no mention about snowboard warranties and the process to have them inspected. I shot warranty (at) dcshoes.com an e-mail, so I hope to hear back from them soon. I noticed the company also lists authorized DC dealers, so I looked at my local options here in Bellingham. I immediately shot off a few e-mails, made a few calls and even walked into Zumiez to see if they could contact a DC Shoes rep. Unfortunately, the main manager at Zumiez said a few other customers have been having issues contacting DC for warranties. He said to check out DC’s website and contacting them directly. I contacted The House about contact information for a local DC rep with no response back. I’m starting to worry DC Snow might be a little to small to provide good customer service.

I might be in luck though, after the disappointing news from Zumiez I decided to make a few more calls to local shops near Seattle. Michael from Grass Roots Outdoors said I should bring in the board and he could call DC in California directly. I’m planning on zipping down to Everett Tuesday to send off my board immediately.

A lot of people question the quality of DC Snowboards since they’re a fairly new snowboard company. I’m really hoping that this incident doesn’t effect my opinion on DC Snowboards. Over the years, the DC Snow division has been perfecting their snowboard technology by working with their pro team. In all honesty, the DC MLF Snowboard is a great freestyle board and I would recommend their boards to others. Hopefully my next buy tops the 2009 DC MLF Snowboard.

Learning A New Open Source Platform

In the last 2 weeks, I’ve picked up a new open source platform called MediaWiki. In the past year I’ve been heavily involved with WordPress theme dev and deployment. Learning MediaWiki has quite a learning curve. It seems that webmasters need a greater emphasis on critical thinking, Apache, PHP, MySQL and the basic understanding on how to run a wiki. Luckily the wiki-geek community is vast, people help one another.

The project, Magickapedia.net – is a wiki based on the popular indie game Magicka. The Magicka wiki we founded in the past month has exploded, with over 1,000,000 views in a month. It’s grown so fast, we’ve had to take time to sit down and battle spammers, learn the open source community and implement various features the out-of-the-box code doesn’t offer by default. We are now in the process of preparing for Magicka Vietnam, standardizing templates and refining the content.

2011 is going to be an exciting year.

MySQL Find And Replace In WordPress Database

If you’re migrating domains, changing your alias, or simply learned the hard lessons between your, you’re, you are, here’s a simple mysql query to run on your database.

[box type=”note”]Be sure to backup your database![/box]

You will need phpMyAdmin or SQL Executioner. A basic knowledge in SQL is a must, so run down to Barns & Noble and get your nerd on!

[code lang=”sql”]
update wp_posts set post_content = replace(post_content,’myoldsite.com’,’mynewsite.com’)
[/code]

In this example, we are targeting wp_posts -> post_content. We are performing replace() on anything in post_content that matches “myoldsite.com”.

The basic logic can be applied to anywhere in the database, but this is very useful if for example, all your posts pointed to a site that no longer exists. I’ve also used this to remove author’s contact information in the content. For some reason they thought it was a good idea to include their phone number and e-mail on every post, which later became outdated! I eventually crated a useful author signature and a way they could update this information in /wp-admin/profile.php.

Testing mail() On Apache

Here is a simple way of testing if your mail() function is working. I’ve used this script to test if the mail servers are properly working. From time to time I’m asked to migrate websites to new DNS’s. When I’m setting up the MX Records, I need to test to make sure the server sends / receives e-mails.

To test outgoing mail using PHP’s mail() function, simply create testmail.php and use this:

[code lang=”php”]
Message successfully sent!

“);
} else {
echo(“

Message delivery failed…

“);
}

?>
[/code]

Very straight forward, set $to variable to your own e-mail. Edit the $subject and $body if needed. The if conditional will e-mail you if the mail() function exists! Otherwise, you get fail. 🙁

CodeSleepShred.com

Whether or not I actually commit to blogging is an eternity of suffering on my end. I’ve purchased countless domains, started new projects and had ideas flop here and there. I guess that’s the nature of a web geek. I’m very surprised the domain CodeSleepShred.com hasn’t been snatched up… Intrigued, I decided to start this blog. I am trying to disassociate from my professional life in this blog for now. Perhaps humoring myself is the key to actually forcing myself to blog.

My goals is to provide an alternative lifestyle blog to the Pacific Northwest. If I were to draw a venn diagram of the PNW, it would encompass: extreme sports, cars, and technology. There is no doubt that this blog will eventually spill into my professional life. But for now, I will be focusing on building content.

O Hai!