Converting real media (rm) files to mp3 in Ubuntu Linux

Download lame and mplayer:

sudo apt-get install lame mplayer

convert rm to wav:

mplayer islam77.rm -ao pcm:file=islam77.wav

convert wav to mp3:

lame --tt "title" --ta "author" --tl "album" --id3v2-only islam77.wav islam77.mp3

adapted from Ubuntuforums.org

Extreme Themes interviews me at androidui.net

Check here:
http://www.androidui.net/index.php/android-ui-news/news–rants–reviews/505-hydtech-interview

and here:
http://www.androidui.net/index.php/android-ui-news/news–rants–reviews/493-weekly-theme-category-review-feb-15-22

Here is the text:

I’ve decided to start doing a new series of interviews with theme developers and developers that contribute to customizing your phone whether it be with widgets, home replacement apps, ROMs, and anything else that may contribute to this area. To kick things off I decided to interview HydTech who as of last week’s Theme Category Review had suddenly boosted into the Top 10 for paid themes.

AUI: Thanks for taking the time to sit down with us and answer some questions. First things first, if you wouldn’t mind telling people a bit about yourself, home replacement apps you use, things like that.

HydTech: I’m just an average guy who started making themes for the android as an experiment and to improve my technical abilities with programming. I have no programming experience and I thought this would be a good way to start. I’ve used all the home replacement apps but I decided to make themes for aHome because they have an easy guide out there.

AUI: Were you surprised to see how popular your iPhone and Mac OS X have suddenly gotten?

HydTech: You mean the themes for android. Very surprised. It’s a nice supplemental income.

AUI: Do you plan to keep developing more themes? If so, do you plan to stay strictly as a theme developer or do you have plans to develop anything else like apps or games?

HydTech: I almost gave up developing themes but recently Google decided to ship me a free nexus one phone for being a loyal developer, so I would like to continue.

AUI: What do you think of the competition and overall quality of themes on the market?

HydTech: I think the competition is tough. There are some great free themes out there, but people still like purchasing themes which have original ideas.

AUI: What’s your favorite theme?

HydTech: I would have to say, honestly, it is either the Mac OS X or Ubuntu themes for ahome.

AUI: When do you plan to release another theme?

HydTech: Maybe tonight.

AUI: Your website deals with a lot of other things aside from Android, a lot of linux by the looks of it. Do you have anything else you want to mention like upcoming projects? Whether it’s dealing with Android or not if fine.

HydTech: I started learning Linux last year and haven’t really used Windows at all. I would eventually like to go into developing open source apps for Linux. I also purchased books on developing apps for the iPhone but never got the time and patience to actually go through with making a whole app.

We’d like to thank HydTech for taking the time to answer our questions and wish him the best in any upcoming themes he releases. You can grab his two Top 10 themes, iPhone and Mac OS X Leopard using the QR Codes below. Also you can check out his website for more themes as well as Linux related information.

Free Nexus One Google Phone!

So check this out! Google just sent me an email saying they will ship out a free Nexus One or Verizon Droid for being a developer and reaching the 5,000 download mark on one of my apps.

Subject: Device Seeding Program for Top Android Market Developers
From: android-market-seeding@google.com

Due to your contribution to the success of Android Market, we would like to present you with a brand new Android device as part of our developer device seeding program. You are receiving this message because you’re one of the top developers in Android Market with one or more of your applications having a 3.5 star or higher rating and more than 5,000 unique downloads.

In order to receive this device, you must click through to this site, read the terms and conditions of the offer and fill out the registration form to give us your current mailing address so that we can ship your device.

You will receive either a Verizon Droid by Motorola or a Nexus One. Developers with mailing addresses in the US will receive either a Droid or Nexus one, based on random distribution. Developers from Canada, EU, and the EEA states (Norway, Lichtenstein), Switzerland, Hong Kong, Taiwan, and Singapore will receive a Nexus One. Developers with mailing addresses in countries not listed above will not receive a phone since these phones are not certified to be used in other countries.

We hope that you will enjoy your new device and continue to build more insanely popular apps for Android!

Thanks,
Eric Chu
Android Mobile Platform

***UPDATE:
I got my confirmation letter from the Android Market Device Seeding Program. Check it out!

Getting root on your new Nexus One Android Google Phone

The Nexus one was rooted before it even got released. Paul at modaco forums showed us how to perform this hack. I’ll try to simplify the method here.

1. First unlock your bootloader if you have a T-mobile Nexus One (this voids the warranty) or get an unlocked version from Google for like $550:

a. download fastboot
b. open terminal or command line and type
– Windows fastboot-windows oem unlock
– Mac ./fastboot-mac oem unlock
– Linux ./fastboot-linux oem unlock

2. Rewrite the Bootloader to obtain root privileges:

a. Download either SuperBoot or InsecureBoot and extract. (The difference is that with the insecure boot you won’t make any changes to the system and you would have to launch su manually)
b. Put the device in bootloader mode:
– Turn off the phone and restart holding the trackball.
c. Flash the bootloader:
– Windows = double click the windows bat file
– Mac = open terminal and cd to the directory containing the file. type
chmod +x install-superboot-mac.sh
./install-superboot-mac.sh

– Linux = open terminal and cd to the directory containing the file. type
chmod +x install-superboot-linux.sh
./install-superboot-linux.sh

Now you should have root!

Rooted Nexus One Google Phone
Pic courtesy of Stericson.

Sony Vaio T – series T350P disassembly

Wanted to switch out the hard drive in my Vaio T350P, but realized its a 1.8″. Disappointed. Also the ram is microdimm (more expensive).

Remove the screws on the back


Push back the clip behind the F5 and Num lock to remove the keyboard.


Carefully remove the ribbon for the keyboard.

power button comes right off.

slide off the other side.

remove screw


you can access the RAM here. pull off ribbon in the center.


and 3 ribbons near the fan and take off the top cover.


remove this ribbon to access HD


here’s your HD


full view

Automatic website backup without SSH enabled over FTP

Last time I backed up my website with rsync and ssh, but on my new host they disabled SSH. Rsync does not work over ftp. I do not want to do incremental backups with delta files like is done with rdiff-backup or duplicity. I need to have an exact mirror of my site. But remember that your sql databases won’t be backed up.

Curlftpfs is the key! In this tutorial I will show you how to backup from one server to a backup location which can be your hard drive, another web host, dropbox folder, Box.net via webdav, etc.

Download curlftpfs, rsync and ncftp:
sudo apt-get install curlftpfs ncftp rsync

make directories to mount your ftp server:
sudo mkdir /media/hydtechblog
sudo mkdir /media/hydtechbackupserver

edit fstab to mount the ftp servers using curlftpfs:
sudo gedit /etc/fstab

add the lines and modify them according to your server:
curlftpfs#username:password@hydtechblog.com /media/hydtechblog fuse rw,allow_other,uid=root 0 0
curlftpfs#username:password@hydtechbackupserver /media/hydtechbackupserver fuse rw,allow_other,uid=root 0 0

One thing to remember is that these two will not mount automatically because when the computer restarts, the fstab is done while you are not connected to the network. To fix this we can just add the mount commands in our crontab.

Edit crontab:
sudo crontab -e
enter the following lines and modify accordingly:
00 09 * * * mount /media/hydtechblog
00 09 * * * mount /media/hydtechbackup
01 09 * * * rsync -avz –rsync-path=/usr/bin/rsync /media/hydtechblog/public_html /media/hydtechbackup/public_html

ctrl + o to write and ctrl + x to save

This will tell cron to mount the folders at 9:00 am and start rsync at 9:01 am. You can replace the backup location to another folder on your hard drive or your dropbox or ubuntu one folder. You can also mount box.net with webdav and use this method.

For encrypted incremental backups checkout duplicity, it also works with webdav and ftp.

Upgraded JesusFreke 1.5 cupcake to CyanogenMod 1.6 Donut

Once I knew what I was doing, everything was simple.
Here are the steps for the G1:

1. Update recovery image (Optional but recommended)

a. download the cyanogenmod recovery image and place it in your SDcard.

b. open up terminal and type
su
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
cd /sdcard
flash_image recovery /sdcard/cm-recovery-1.4.img
cat cm-recovery-1.4.img > /system/recovery.img

2. Update cupcake to donut

a. download the 1.6 image here and place it in the sdcard

b. download the mod image here and place it in the sdcard

c. turn off phone

d. boot into recovery mode by pressing home + power

e. from the recovery menu you can select nandroid to backup for safety (optional)

f. alt+ w to wipe (optional)

g. alt + a to apply, first select the 1.6 image and let it complete

h. Do not restart!

i. alt + a to apply, select the cyanogemod image and let it complete

j. reboot

Revealing Opera wand passwords on Ubuntu Linux and OS X

There are several utilities in Windows which reveal the opera wand password and I haven’t used windows in forever. The Opera wiki has a Power button which can help capture your password while logging in to the site. Click this link in Opera and it will install a button which you can drag to any panel. While on a page which requires a password, you can click on this new wand instead of your original wand.

Voila!

Backing up my wordpress blog and website using Ubuntu

I’ve been noticing that my webhost server keeps going down for a few hours every day and it scares me that I’ll lose all my data. So, I started looking for automatic backup solutions and this is the best way I could come up with.

Backing up the wordpress database:

I’ve tried the following plugins

1. WordPressbackup.com
This plugin backs up my data to their server automatically. only backs up the database though. must register for a free account at wordpressbackup.com. The backups occur once every few days.

2. Bei-fen
This plugin backs up my data including images and files to a location on my server

3. DBC Backup
Does a cron backup automatically at any location on my server at any time interval I set it for. Only backs up the database.

4. WP-DB-Backup
Can schedule the database to automatically backup to your server or automatically email them.

5. SMEStorage Backup
Based on WP-DB-Backup. Must register for a free account at http://www.smetube.com/smestorage/ and you can backup your data to a cloud storage service like Amazon S3 or Box.net. You can even have the backups sent to your email.

Backing up my whole website from my webhost to my computer:

I use a tool call rsync in linux to automatically sync my public_html directory on my webserver to a backup folder on my Computer which is synced automatically with Dropbox. You can also use Ubuntu One. For this tutorial your web host must have ssh enabled. If you can’t get ssh, then backup your wordpress website over ftp with curlftpfs on Linux.

Follow these steps:

1. Sign up for an Ubuntu One account or a DropBox account and download/install the desktop client. You can get a 2GB account for free.

2. Download the necessary files
sudo apt-get rsync ssh

3. Set up autologin with ssh so you won’t have to enter your password each time.
sudo ssh-keygen -t dsa
press enter each time without changing anything. this will make a id_dsa.pub key in you .ssh folder.
copy the ssh key to your server using scp
scp /home/user/.ssh/id_dsa.pub user@yourserver.com:
login to your server using ssh
ssh user@yourserver.com
enter password and append the key to authorized_keys
cat id_dsa.pub >> .ssh/authorized_keys
remove the key from the home directory on your server
rm id_dsa.pub

4. Set up a cron job to sync the public_html folder to your dropbox folder
crontab -e (do not sudo)
open with editor like nano
enter something similar to the following line
* */5 * * * rsync -avz --rsync-path=/usr/bin/rsync -e ssh user@yourserver.com:home/useronserver/public_html /media/sdawhatever/locationof/dropbox/backup/
(this is telling cron to sync every 5 hours, for more help with cron check wiki)
press ctrl+O to save file, enter to save, ctrl + X to exit.

thats it, your done!