Wednesday, December 21, 2011

Friday, December 16, 2011

I finally got tired of all the .swp files in my vim directories. To delete them in one pass you can run
rm -rf `find -type f -name *.swp`
note: those aren't single quotes, they're grave accent quotes (the thingy under the ~)

Monday, November 21, 2011

Andriod ADB Device Not Showing Up In Ubuntu?

I've been debugging an Android app in Ubuntu and have had ongoing issues getting the debugger to recognize my device. Starting and stopping the ADB server seems to do the trick every time:

$ANDROID_HOME/android-sdk-linux/platform-tools$ sudo ./adb kill-server
$ANDROID_HOME/android-sdk-linux/platform-tools$ sudo ./adb start-server

Monday, November 7, 2011

MySQL Vertical Output

To see results structured vertically in the mysql console use \G instead of ;

mysql> select * from users \G
*************************** 1. row ***************************
id: 1
email: user1@somedomain.com
encrypted_password: asdf123
created_at: 2011-11-07 22:24:46
updated_at: 2011-11-07 22:24:46
roles_mask: 1
*************************** 2. row ***************************
id: 2
email: user2@somedomain.com
encrypted_password: asdf123
created_at: 2011-11-07 22:27:33
updated_at: 2011-11-07 22:28:18
roles_mask: 0

Saturday, April 30, 2011

View table details in MySQL

show table status like 'yourtablename';

Will display info on row_count, auto_increment value, etc. Handy.