Feeds:
Posts
Comments

Archive for November, 2007

how would you like your morning coffee?

well, that is not about Coffee itself, but about things you do everyday, esp.Programmer 😛 – it means – for those who did not got it yet: how many websites, email, bug tracking systems, …. etc you open up every morning? yeah, I know: Much!

you can get Organized by Mozilla FireFox Addon Morning Coffee

Enjoy!

Advertisements

Read Full Post »

If you missed your mysql root user password, then here are the steps to reset it:

  1. stop mysql server
    service mysqld stop
  2. make sure all mysql process are dead
    ps -A | grep mysql
  3. start mysqld in safe mode
    mysqld_safe –skip-grant-tables
  4. open a new shell window and start mysqld
    service mysqld start
  5. access mysql database
    mysql -u root mysql
  6. reset password of root user
    update user set Password=PASSWORD(‘yournewpassword’) where user=’root’;
  7. stop mysqld_safe and restart mysql server
    service mysqld restart.

Happy Administration!

Read Full Post »

Resident Evil

I saw people watch what ever movie they got in hand, why the hell is that?

I believe that everyone of us (human beings) should have a schema for everything, the way he talk, wear, etc .. and things he/she eat, drink, watch, .. etc …. people he likes and dislikes …. in short: have your own identity!

well, I watched resident evil part 3 – extinction – recently; I believe this will not happen – at least at this life 😛 though still, the movie is Very Interesting, exciting and entertainment is up to full. I encourage everybody to watch it.

Read Full Post »

Oracle announced Oracle Mix, which is another Oracle product built on JRuby On Rails – and it’s the first public and the largest of kind; as I know – that aims facilitating communications between Oracle customers with each other and Oracle itself.

Oracle Mix released in just 5 weeks of work. and it’s a combination social network, idea sharing site, group collaboration tool, and answers forum. launched in Beta – of course!

‘Mix’ all comeponents are Oracle Enterprise Linux, Oracle Application Server, Oracle Database, Oracle SSO, Oracle Internet Directory. And JRuby on Rails – (Red Stack).

Read Full Post »

Ruby and Yaml

Yaml (Yet Another markup language) allows developers to serialize and deserialize Object to files and still human readable and editable. in short!

I will explain how to load, save, update yaml file using ruby (Yaml4r). a sample source code can be found at the end of this article

As always: busy developer walk through:

  • Installation
    • gem install RbYAML
  • Usage
    • Tip! you can serialize any object to yaml files (well, user defined object need more extra steps); now we load, flush, and update an object – all by yaml file:
      • Step One: loading object from yaml file
        obj = YAML::load(File.open(‘test.yaml’));
      • Step Two: modifying/creating the object (which is an array) and save it back to the file:
        obj << ‘anything’ File.open(‘test.yaml’, ‘w+’) { |out| YAML::dump(obj, out)}

require ‘yaml.rb’

obj = YAML::load(File.open(‘test.yaml’))
if obj
obj << ‘anything’
else
obj = [‘anything’]
end

File.open(‘test.yaml’, ‘w+’) { |out|
YAML::dump(obj, out)
}

Read Full Post »

This is a busy developer tutorial that walk through installing ruby on rails on Linux Machine.

get Downloads ready

  • type yum install ruby rdoc irb
  • Rubygems from http://www.rubyonrails.com/down
    • unzip the package.
    • type ruby setup.rb
  • type gem update
  • type gem install rails –include-dependencies
  • choose your lovely database: we will be using mysql for this tutorial; so, that requires us to install mysql
    • type yum install mysql mysql-server mysql-devel
    • type gem install mysql
      if you got some error of compiling native blah blah … the check you have GCC installed, and you may use some options like the following:
      gem install mysql — –with-mysql-include=/usr/include/mysql –with-mysql-lib=/usr/lib/mysql

Testing your installation

  • go to path of your choose.
  • type rails <your project name> you will notice a new folder created. cd it!
  • type ./script/server and go to your browser http://localhost:3000 ; if you see RoR welcome page. then you are there. Congratulations.

Read Full Post »