Had to edit the MySql

I remember the days when I had to open my notes to edit a table using SQL. Now I use the MySQL Administrator GUI tool in Ubuntu Programming package and it’s a breeze.

Thinks can be so easy sometimes. Seldom.

No Comments

What would you change in the language Ruby?

In one of the many jobs interviews I had last summer the question was asked:

If you could change something in the Ruby language, what that would be?

I find Ruby to be useful the was it was designed so I did not know what to say.

Afterward ( yes I did not get the job) I went to look for oddities in the language and I found something interesting. Passing variables into a function its always done by reference but variables only mutate if the memory used by that variable is dynamic. Observe the function below. What will myVar print, 3 or 7 ? If you want for myVar to be altered by someFunc, whats the most intuitive way to do it.

1 Comment

mysql-query-browser

Years ago, every time I had to clean up a snafu in the sql database for wordpress I had to bring up the sql command line manual.

Not any more.

mysql-query-browser is a gnome GUI front end for your sql databases.

to install in Ubuntu as root:

>apt-get mysql-query-browser

and that’s it.

Power to the people!

No Comments

Set a timer to logout a user

Premise: A user tells you that she/he only needs 20 minutes in a computer to do a job.
You, being the admin from hell, set up a script to automatically kick out that user after the time expires.
In Python.

No Comments

c++ elapsed time

How to meausure the elapsed time for a given path of execution:

No Comments

Fetch the weather.

This perl script fetches the weather from site:

weather.gov

and put the current conditions for the city of choice in the file

/tmp/ktemp

I should remove the temporary file and debug print statments.

No Comments

Windows net send in Linux

Windows netbios protocol has a nifty little program that allows you to send message from one user to another.

net

This is the Syntax:

C:\net send username “message”

Let you send messages from PC to PC inside a Windows network using netbios protocol.

What if you are in a Linux box and want to send a message to a user within a Windows network?

Try

>echo “some message” | smbclient  -M username

The message will be send to the winbox where username is logged in.

Also you can find a Linux GUI at

http://sourceforge.net/projects/gladenetsend

No Comments

Use Ruby to retrieve your Gmail messages.

It throws the info to standard output. What to do with the output? Anything you want!

And here is the code:

* You will need sudo privileges.

No Comments

Testing the code snippets plugin

Lets see how code snippets work:

No Comments

Yet another new beginning.

Someday I will be diligent and learn the tedious job of migrating sql databases from one system from another. For the time being, let’s do the “Mandala” approach and start fresh.

No Comments