Had to edit the MySql
Posted by admin in Eye Openers on February 8th, 2010
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.
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.
mysql-query-browser
Posted by Javier in Eye Openers, Linux Tools Notes on July 22nd, 2009
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!
Set a timer to logout a user
Posted by Javier in Python Code on July 15th, 2009
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.
c++ elapsed time
Posted by Javier in C/C++ Code on July 14th, 2009
How to meausure the elapsed time for a given path of execution:
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.
Windows net send in Linux
Posted by Javier in Eye Openers on July 13th, 2009
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
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.
Testing the code snippets plugin
Posted by Javier in C/C++ Code on July 10th, 2009
Lets see how code snippets work:
Yet another new beginning.
Posted by Javier in Uncategorized on July 10th, 2009
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.