Tuesday, February 26, 2013

windows registry files

As I wrote in a previous post, I had to change computers.

One of the things is I had a lot of configuration in the registry file of the old computer (from which I only have the hard drive).

So I needed to extract this info...

The registry files are located in

Windows\System32\Config

So I copied those files to a folder in the new computer.

Now I needed a program to read those files, so I used: Windows Registry Recovery



Lastly this didn't work as expected. Apparently the actual registry isn't located (or accesible) in Windows\System32\Config. I say this because I inspected the files found in that dir with the tool afore mentioned, and I didn't find what I was looking (the entries for WinSCP's configuration). So I had to mount the HDD in the old computer, cross my fingers and use REGEDIT to export them.

I was lucky enough in that the computer worked for the time I needed : )


apache user

The linux user that uses Apache webserver can be seen under User directive in apache's configuration

Fedora: /etc/httpd/conf/httpd.conf
Ubuntu: /etc/apache2/apache2.conf


Who in the world started changing the paths of files depending on the flavor of the linux distrubution ?

Sunday, February 24, 2013

query for table definition on mysql

in the console, issue:


show create table my_tables_name;

and it will show the table definition...

for example:

mysql> show create table client_users;
+--------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Table        | Create Table                                                                                                                                                                                   |
+--------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| client_users | CREATE TABLE `client_users` (
  `id` varchar(36) NOT NULL,
  `client_id` varchar(36) NOT NULL,
  `user_id` varchar(36) NOT NULL,
  UNIQUE KEY `id` (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 |


(for cakePHP guys: I wanted not to use a HABTM)


Apps I can't work without


I recently had to changed computer, and reinstall all the software... : s
So I guess it's a good time to write the (almost all freeware) apps I've been installing, without any particular order. Thanks you guys for that great development, I hope some day to contribute to you guys back.
And that gets me on working...

cancel script completely on ctrl-c

I found this question interesting: basically how to cancel completely a script and all child processes : You do this by creating a subro...