Next Android App?
03 February 2011

I've been tossing around ideas for another Android app for a while. Since I've recently started working as a MySQL DBA at iStockphoto, I decided it would be cool to make a MySQL monitoring app. Now, we already have MySQL Enterprise Monitor, so I thought maybe there would be an API to use, but all of my Google searches have turned up naught.

The ideal would be to do a GET on a simple URL which provides a JSON object which my App would consume and do stuff with. I'll keep digging and see if I can come up with anything. If any MySQL people come across this post, feel free to give input.

Quick Linux tip. If you want to access Microsoft's fancy new web mail interface in Linux/Chrome you need to spoof Chrome's user-agent. Since it works in Firefox, I used that user-agent for spoofing. I setup a script with this line

google-chrome --user-agent="Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101206 Ubuntu/10.10 (maverick) Firefox/3.6.13" https://webmail.domain.com

Next, I made a launcher from my desktop to call this script. Note that all your Chrome windows and tabs will be using this user-agent.

sed + find
17 December 2010

I needed to add a style to every theme for a site (100s). I decided to go simple and just append to the file instead of inserting at a certain point since I didn't know what state any of the themes were in.

This was my solution:

sed -i '$adiv#shortcuts.span-18 a.email {color: #009;text-decoration: underline;}' `find /path/to/themes -name screen.css`

 

kill -9
02 December 2010

Suppose you have a hung Linux application with a pile of processes. Here's a quick way to kill them all without having to issue a kill for each separately:

# kill -9 `ps ax | grep AppName | cut -d ' ' -f1`

Use with extreme caution! I take no responsibility for ensuing results. Please run the piece within the backticks separately before implementing the kill to verify that you're getting the right list of process IDs.

Tags


Fatal error: Uncaught Error: Undefined constant "Math" in /home/sgreimer/stevenreimer.com/includes/classes/TagCloud.class.php:188 Stack trace: #0 /home/sgreimer/stevenreimer.com/templates/_includes/sidebar.php(52): TagCloud->showCloud() #1 /home/sgreimer/stevenreimer.com/templates/index.tpl.php(25): include('/home/sgreimer/...') #2 /home/sgreimer/stevenreimer.com/includes/Page.class.php(412): include('/home/sgreimer/...') #3 /home/sgreimer/stevenreimer.com/public_html/index.php(25): Page->show() #4 {main} thrown in /home/sgreimer/stevenreimer.com/includes/classes/TagCloud.class.php on line 188