Skip to main content

Posts

Showing posts from February, 2009

Installing a New Hard Drive on Ubuntu

Installing a new hard drive isn't a particularly arduous task, but there are a few commands I usually forget. Here are the steps I take after hooking up a new drive: Run fdisk -l and find the new drive's device (we'll call it xxx). Run sudo fdisk /dev/xxx and create a new primary partition (enter n , p , 1 , default, default). Run mkfs.ext3 /dev/xxx1 to format the new partition. Label the new ext3 partition using sudo e2label <new-label> Refresh /dev/disk/by-uuid using sudo /etc/init.d/udev restart Edit /etc/fstab to add the new partition to the list of mounts.
Read more

Android Recipes and Snippets

I've put together a small collection of Android recipes. For each of these recipes, this is an instance of Context (more specifically, Activity or Service ) unless otherwise noted. Enjoy :) Intents One of the coolest things about Android is Intents . The two most common uses of Intents are starting an Activity (open an email, contact, etc.) and starting an Activity for a result (scan a barcode, take a picture to attach to an email, etc.). Intents are specified primarily using action strings and URIs. Here are some things you can do with the android.intent.action.VIEW action and startActivity() . Intent intent = new Intent(Intent.ACTION_VIEW); // Choose a value for uri from the following. // Search Google Maps: geo:0,0?q=query // Show contacts: content://contacts/people // Show a URL: http://www.google.com intent.setData(Uri.parse(uri)); intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); startActivity(intent); Other useful action/URI pairs include: Intent.ACTION_DIAL , tel://8675
Read more

Ubuntu on the OLPC XO

Between last night and early this morning, I got Ubuntu Intrepid running on my XO using a SanDisk Extreme III 4GB SD card. There's lots of instruction available on the subject, but it took the combination of several sources of information to get it working for me. My findings and suggestions are below. To do this trick, you'll need a USB stick with at least 1GB of space and an SD card with at least 2GB of space (you'll erase both of them completely later). Start off by reading teapot's instructions for installing Intrepid. Start downloading the bzip archive (don't put it on your USB stick yet). Check to make sure you have a developer key and that your XO build and firmware are up-to-date. Now that you think you're up to date, you need to update your firmware to version Q2E24 . Download this Joyride build and follow these directions to write it to your USB stick. Connect the USB stick and reboot your XO. After it reboots, it will start updating your firmwa
Read more

Vim Features Overview

I just found this really nice overview of Vim features while reading up on omni completion. I've used Vim for years and still found quite a few tidbits in there that were news to me. Good ol' Vim. Always full of surprises. VIM for (PHP) Programmers Publish at Scribd or explore others: Internet & Technolog Internet & Technolog vim Technology-UNIX
Read more