Loose Change

Tips

Firefox Tips

Here’s an easy way to reset the Firefox master password if you’ve forgotten it:

a. type the following URL in the Firefox address bar and press enter: chrome://pippki/content/resetpassword.xul

b. Press the reset button

WARNING! This will delete any settings or passwords that you may have previously saved.

You can, of course, create a new master password again via the Tools menu.

Linux Tips

Some useful bash commands:

Ctrl-A: go the start of the line at the command prompt
Ctrl-E: go to the end of the line at the command prompt
Ctrl-W: delete words at the prompt from the cursor to the beginning of the line
Ctrl-K: delete words at the prompt from the cursor to the end of the line
Ctrl-D: exit the shell; in C Shell, this combination also serves as an autocomplete character
Ctrl-S: lock the keyboard
Ctrl-Q: unlock the keyboard
The Scroll Lock Key: freeze the screen if text scrolls by too fast
strace : see the system calls makes
The Tab Key: autocompletes the line at the command prompt. Pressing Tab twice shows a list of all matching filenames. To simply complete a line, use the Esc + / key combination.

Important Linux Directories:
/ The ‘root’ directory; reference point for all directories.
/bin Binaries which are absolutely essential to run Linux.
/boot All the files required for booting Linux on a system.
/dev All the devices have their corresponding files here.
/etc All the configuration files for the various software are stored here. Don’t play with this directory.
/home All users will have their ‘My Documents’ under this directory.
If your id is tomh, your ‘My Documents’ (called home-directory) is /home/tomh.
/lib The libraries required by system-applications. (Just like DLLs in Windows.)
/lost+found When a disk-check finds files which are damaged or which are not linked to any directory, they are recovered to this directory. Such damages are almost always due to incorrect shutdown.
/misc Miscellaneous files!
/mnt The directory where peripherals and other file-systems are mounted.
/opt The directory where optional software are installed.
/proc proc houses a pseudo-filesystem. Its contents really do not exist anywhere on the disk, and are made available only when you cd to this directory and look at some file. Don’t worry about it, anyway.
/root The home-directory for the super-user: root.
/sbin The system-administration binaries exist here.
/tmp The directory where temporary files are created and stored.

/usr Everything related to users!

/usr/bin /bin houses critical binaries, whereas /usr/bin stores other binaries: not so critical but required nevertheless.
/usr/include The header-files required by programs for compilation.
/usr/lib The libraries required by user-applications.
/usr/local Files peculiar to this particular machine.
/usr/sbin User-administration binaries.
/usr/share Information that can be shared by most users.
/usr/src The source-code for the Linux kernel.
/usr/X11R6 Files needed by the X Window system.

/var Files whose contents vary frequently are in this directory.

/var/log The log-files of the system.
/var/spool Directories for mail, news, printing and other queued work.

Information for this post was taken from Essential Linux Commands.


Windows Tips

Here are two easy and useful Windows Registry Hacks for folks who program frequently:

This hack adds a “DOS Prompt” option to the context menu of any folder in Windows Explorer. Great for opening DOS Prompts in folders that have long, unwieldy names. I find it really useful when I use the command-line to debug or compile files. Here’s how you go about it:

    • open regedit and navigate to HKEY_CLASSES_ROOT\Folder\shell
    • Create a new key (use the right-click menu) and name it “DOS Prompt”
    • Select the new key and in the right-hand pane, modify the Default value to read “Dos Prompt” (without the quotes)
    • Add a new key to “DOS Prompt” just like you did in step 2. Call this new key “command”
    • Select the new key and in the right-hand pane, modify the Default value to read “Cmd.exe /k pushd %L” (again, without the quotes)

This hack behaves pretty much like the previous one except it lets you open a Windows Explorer window at the current folder with only that folder in the left hand pane. If having to look through all the folders on your computer in Windows Explorer’s Folders pane when you’re working only in one directory irritates you, this hack’s for you. Here’s how you do it:

    • open regedit and navigate to HKEY_CLASSES_ROOT\Folder\shell
    • Create a new key (use the right-click menu) and name it “Root This”
    • Select the new key and in the right-hand pane, modify the Default value to read “Root This” (without the quotes)
    • Add a new key to “Root This” just like you did in step 2. Call this new key “command”
    • Select the new key and in the right-hand pane, modify the Default value to read “explorer /e,/root,%L” (again, without the quotes)

Here are two utilities that may come in handy:

1. WIMC can be used as the Windows equivalent of the Linux “ps” command. When used in the following manner, it lists all the processes running on your system.
prompt> wimc process get caption, processid, commandline

2. Taskkill is akin to the Linux “kill” command. Sample invocation:
prompt> taskkill /f /pid
You can get the PID using the WIMC command as outlined in 1.

These commands can come in handy if your system gets infected a worm like scvhost which doesn’t allow you to open a Task Manager window.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: