Installing MySQL GUI Tools in Ubuntu 10.10

      Download Generic x86 tarball from http://dev.mysql.com/downloads/gui-tools/5.0.html

      mv mysql-gui-tools-5.0 /usr/local/

        Create symlinks to PATH location:

        ln -s /usr/local/mysql-gui-tools-5.0/mysql-query-browser-bin /usr/local/bin/mysql-query-browser-bin
        ln -s /usr/local/mysql-gui-tools-5.0/mysql-query-browser /usr/local/bin/mysql-query-browser
        ln -s /usr/local/mysql-gui-tools-5.0/mysql-administrator /usr/local/bin/mysql-administrator
        ln -s /usr/local/mysql-gui-tools-5.0/mysql-administrator-bin /usr/local/bin/mysql-administrator-bin
        Create symlinks to /usr/local/share

        ln -s /usr/local/mysql-gui-tools-5.0/locale /usr/local/share/locale
        ln -s /usr/local/mysql-gui-tools-5.0/mysql-gui /usr/local/share/mysql-gui
        Almost done..
        At this point mysql-administrator should be fully working.
        However with mysql-quer-browser, I received a shared library dependency “libgtkhtml-2″ error, when ever I tried to start it. It turns out Ubuntu 10.10 has libgtkhtml-3.14 installed. Manual download and install libgtkhtml-2 needs to performed since it’s no longer in the Ubuntu Universal repositories for 10.10.
        http://packages.ubuntu.com/lucid/i386/libgtkhtml2-0/download

        tony@acer01:~$ mysql-query-browser
        /usr/local/mysql-gui-tools-5.0/mysql-query-browser-bin: error while loading shared libraries: libgtkhtml-2.so.0: cannot open shared object file: No such file or directory

        dpkg -i libgtkhtml2-0_2.11.1-2ubuntu3_i386.deb


      Tags: ,

Ruby cli_mailer

After much nights of Ruby programming and many revisions, I finally manage to have an beta release of Ruby cli_mailer.

I originally planned on writing a full mail (Unix command line email client) like program in Ruby. Though I was able to have an almost identical console interface to mail’s reading, viewing, and deleting emails, using POP. I was having a really hard time, keeping the connection alive after a certain number of seconds after initiating the connection.

So instead of having the incoming POP email client like usage that mail provides, I instead wrote the application to only support the mail sending features almost similar to mailx.

I would think developers or anyone wanting to send email from a Linux/Unix server without the hassle of sendmail, postfix, exim, etc… may find this simple program useful. I know I do, since I always find myself wanting to easily send emails from the command line whenever I’m using or doing some sort of testing on a Virtual Machine.

If you’ve ever used mail on a Linux/Unix system to send email messages, Ruby cli_mailer is practically identical.

Basic Usage:
Will get prompt to write email message that gets sends to root@rubyninja.net and blinds copy ccemailaddress@rubyninja.org

rcli_mailer.rb -s 'Title of message' -c ccemailaddress@rubyninja.org root@rubyninja.net

Will email the contents of sendmail.cf to root@rubyninja.net

cat /etc/mail/sendmail.cf | rcli_mailer.rb -s 'God help me' root@rubyninja.net


rcli_mailer.rb -s "I'm so sorry" -c jrsysadmin@rubyninja.net root@rubyninja.net < /etc/postfix/main.cf

NOTE: Ctrl-D is NOT supported by Ruby cli_mailer at the moment, you'll need to use the '.' (dot) character
to send the email message.

I tried to make Ruby cli_mailer as moduler as possible, since I'm planning adding the project to github, and I already have in mind more features to add into it.

Enjoy :-)
rcli_mailer-01.tar.gz

Documentation
rdoc

Tags: ,

Acer TimelineX 1830T-1327

Unfortunately the fan noise on the MSI Wind u100 netbook was unbearable, thus I was force to sell my netbook. I love my MacBook Pro, but even at 13 inches, I at thought at times that it was to bulky to carry around on my man purse. I was seriously looking on purchasing an 11 inch MacBook Air, but the price was just to high for the hardware that I’m getting. I researched some of the 11 inch Dell notebooks/netbooks, but it appears that Dell is selling them with AMD chips. Given the long and bad history that I’ve had owning laptops with AMD chips in them, I was forced to look elsewhere.

On my weekly visit to Microcenter I saw the Acer TimelineX on display and immediately tarted analyzing its specs. At $699 with an Intel Core i5 (1.2Ghz), 4 GB DDR3 RAM and a 500GB 5400 rpm, I decided to buy the notebook that same day with even without researching its Linux hardware compatibility. The laptop came with Windows 7 Home Edition, so immediately once I powered up the laptop I installed Ubuntu.

With Ubuntu, the only problem that I had was getting the wireless to work. This was something that didn’t surprised me given that the laptop has a Broadcom wireless chipset. Luckily, enabling the restricted wireless driver got the wireless working. The laptop runs dead silent and haven’t problem hibernating and resuming on the computer. The only quirk when resuming back, even from screen saver, is that I have to manually trigger the keys to turn on the wireless card. Other than that, this little computer runs Ubuntu really well and at half the cost of a MacBook Air!!

Also, I have the ability to upgrade to 8 GB’s of RAM and add an SSD drive if I decide too, can MacBook Air owners do that? haha…

What’s in my bookshelf?

It’s been a couple of months since I finished reading “Murder City Ciudad Juarez and the Global Economy’s New Killing Fields” by Charles Bowden and I just realized it’s injust to not write a review to a truly amazing book.

Unfortunately the general public does not know that Mexico is on its way of become a full fledge Narco state. According to United Nation’s advisor and expert in international organized, Dr Edgardo Buscaglia, “the state’s institution and Mexico’s civil society is in as criminal organizations are undermining the legitimacy of the Mexican state and getting legiticay approval and acceptance by society.”
In reality is that Mexico is in a verge a civil war, caused by the failed US drug prohibition policy and many other key decisions made by the governments surrounding it.

The book Murder City is primarily focused in Ciudad Juarez, Chihuahua and it’s surrounding border cities.

The book consists of three different protagonists; Miss Sinaloa, Emilio Gutierrez, and El Sicario. In short Miss Sinaloa is a pageant queen who goes to a private party in Ciudad Juarez and she gets raped by the police and goes insane, which eventually she in ends up in a mental asylum on the outskirts of Ciudad Juarez. The second protagonist is Emilio Gutierrez. He is a journalist who published stories about the crimes that the Mexican army was committing to local residents. Eventually until receiving death threats warnings from elements of the Mexican army. The author Charles Bowden mostly describes on how the United States doesn’t want to face facts and admit that Mexico is not a country that respects human rights. What impacted on me the most on Emilio’s Gutierrez story is how currently the United States hypocritically critizes other nations for human rights abuses and when a person like Emilio Gutierrez asks for alysum, the US see’s and treats him like a criminal. The third and final protaganist on this book is “El Sicario”, which in English translates to “The Hitmen”. El Sicario’s story in my opinion is what makes this entire book a classic. Charles Bowden interviewed El Sicario, and painted his before, during and after life, after working for a drug cartel and organized crime for over 20 years.

This book is definitely the best non-fiction piece of literature that I’ve read in my life thus far. Although I don’t fully agree with all of Charles Bowden views, specially his views about illegal immigration. He deffinetly portrayed and informed on other things about Ciudad Juarez and Mexico to that matter, which I wouldn’t really thought or think about. The most notable being the affect of the North America Free Trade Agreement (NAFTA). This is the primary reason why he added the “Global’s economy’s Killing Field’s” subtitle to the book. Essentially what NAFTA has done in Ciudad Juarez is to, attract hundreds of thousands of peasants from southern Mexico to essentially work on American slave factories. Of These factories almost 100% turnover in a city of poverty where it’s social society is faced with the inability of being able to take care of their young, and create a culture where theres 500 – 900 street gangs. Thus creating Ciudad Juarez the most dangerous and voilent city of the world. Where it’s violence exceeds of those in Iraq and Afghanistan.

Charles Bowden and Emilio Gutierrez on the “Narco State” National Geographic documentary.

An Italian filmmaker interviewed “El Sicario” on the truly amazing documentary called “El Sicario – room 164″. (German subtitles)



BookTV has two really good interviews made to Charles Bowden about the book.
LATimesFestival of Books Interview and Calling with Charles Bowden Murder City Ciudad Juarez and the Global Economy’s New Killing Fields
BookTV – Charles Bowden Interview

References:
http://www.youtube.com/watch?v=SBQGZrZY1Rg&feature=related
http://www.youtube.com/watch?v=jT0HD_6hfq4&feature=related

New Year’s resolutions

In no particular order.

1. Show up to work on time.
2. Loose the weight I gained in 2010.
3. Fix my bike.
- Avoid driving whenever possible.
4. Become a Red Hat Certified Engineer (RHCE)
5. Become an advanced Level II Linux Professional Institute Certified Systems Administrator
6. Learn Object-Orientetd PHP.
- Rewrite my Ruby and Perl scripts in PHP.
7. Explore FreeBSD in depth.
8. Learn PostgreSQL.
9. Upgrade RAM on my MacBook Pro.
10. Learn Git.
11. Buy a TV.

Phusion Passenger = good stuff

While mod_ruby is perfect to serve dynamic Ruby web pages, the project looks like its long dead; given that it hasn’t been updated for over 4 years now. Now the de facto way to deploy Ruby on Rails applications is Phusion Passenger. Compared to mod_ruby, configuring the Phusion Passenger (mod_rails) Apache module is ridiculously easy to do. Essentially all I had to do is download and install the gem.

The only quirk, which was entirely my fault for being lazy, was not reading the portion of the documentation where it mentions that the default environment is set to production. This gave me quite a headache as I couldn’t figure out why I had to restart Apache every time I modified any controller code (RoR noob).

My fix:
.htaccess
RailsEnv development

I’m amazed on Phusion’s work, the company responsible for the module. As they’ve take something that’s been historically difficult to deploy (at least I think) and made it really simple.
http://www.modrails.com/

RDoc: Documenting Ruby scripts

RDoc makes documenting Ruby scripts be really simple. RDoc is fairly simple to use, as it has a straight forward SimpleMarkup syntax which the RDoc utility uses to traverse the entire Ruby script and automatically generate pretty html documentation pages.

Now I have documentation for the dead simple Ruby script that I wrote to encode videos for my iphone.
iphone_encode.rb documentation

watch command line utility for alternative for Mac OS X: (Solved by MacPorts)

Since I use all Apple Mac OS X as my primary desktop operating system of choice, I wrote a ruby script ago that mimics the GNU/Linux watch command on OS X a couple of months ago (watch.rb). Little that I knew that the watch package is available within MacPorts.

In short MacPorts is an free and open source package management system built into OS X. (Essentially the BSD UNIX port system). The awesome thing about MacPorts is that it lets you install traditional UNIX userland applications that are not included by default by OS X like wget, and watch.
http://www.macports.org

One of the best Documentaries I’ve ever seen…

What’s in my bookshelf?


I finally finished reading my first book on Ruby programming. Ruby: Visual QuickStart Guide, by Larry Ullman has to be the perfect introduction book for anyone trying to learn the Ruby programming language, even though sadly it only has 3 five star reviews on Amazon. The author writing thoroughly explains the concepts in a friendly and easy to understand manner. This being the third book that I’ve read from this same author, the other titles being for MySQL and PHP (no reviews on these yet since I’m not fully finished reading them).

One thing I would’ve like changed the author to change was on the database chapter, as it was mainly focused on SQLite. It would have been better if the author used MySQL instead. Also it would have been better if the author removed the dedicated chapter to Rails, and instead extended the chapter to have more generic web related like Net::HTTP, given how powerful that single class is.

Chapter 1: Getting Started
Chapter 2: Simple Scripts
Chapter 3: Simple Types
Chapter 4: Array, Ranges, and Hashes
Chapter 5: Control structures
Chapter 6: Creating Methods
Chapter 7: Creating Classes
Chapter 8: Inheritance and More
Chapter 9: Modules and Includes
Chapter 10: Regular Expressions
Chapter 11: Debugging and Error Handling
Chapter 12: Rubygems
Chapter 13: Directories and Files
Chapter 14: Databases
Chapter 15: Networking
Chapter 16: Ruby on Rails
Chapter 17: Dynamic Programing

I would highly recommended this book to anybody starting or wanting to learn Ruby.
Ruby-Visual-QuickStart
4/5