Sites

Wikipedia
SlashDot
Gentoo Linux
Loop-AES Encryption
Geoiptool
Showing posts with label Tips and Tricks. Show all posts
Showing posts with label Tips and Tricks. Show all posts

Thursday, July 2, 2009

How To Use Mod Rewrite to Clean Up URL's

If you have not enabled or setup Mod Rewrite Then Read This Guide Here.

Ok so lets compare these:

http://www.yoursite.com/index.php?p=contactus

With the power of the mod_rewrite apache module, we can make this URL much cleaner.

http://www.yoursite.com/contactus.html

so now that you get the idea, here is how the above can be accomplished:


RewriteRule ^([^/]+).html$ /index.php?p=$1 [QSA,L,NC]

Now If you wanted your URL to look like a directory, you would use this line instead of the previous line:

RewriteRule ^([^/]+)/?$ /index.php?p=$1 [QSA,L,NC]

This would return:

http://www.yoursite.com/contactus/


Bookmark and Share


Wednesday, June 24, 2009

Keeping Non-Forking Apps Running

This nifty software named SCREEN, allows a user to keep whatever they have going on in there shell for them later. Like saving a document or running a graphical shell program without ever exiting it. It allows you to come back relogin and re-establish your connection with the original shell.

So on gentoo issue the command "emerge screen" from the shell prompt.
this will download and install screen. Now we are ready to use it.
Lets say you like to use ircii off your linux machine and dont want to leave the shell open or you simply cant stay connected to it 24/7. Now that you have screen installed issue the command "screen". Now screen is loaded, issue whatever you would normally run forexample ircii, To exit you would just close the shell , or if this is a remote connection just kill ur ssh client. Now when you return and would like to reconnect and re-establish your session, login to the shell and issue a screen -r. This should bring you back to the shell screen exactly where you left it.

-Enjoy

Bookmark and Share

How To View Current Running Processes

From the command shell you are going to be using the program "ps".
so lets give it a try, to check your current user processes only do this:

ps -u

Which will only display the current user processes.

Now lets see all processes running on the box regardless of the user
running them.

ps -ax

Now you can quickly see what is currently running on you linux machine.


Bookmark and Share

How To observe a logfile continuously?

From the shell prompt issue this command:

tail -f /path/to/logfile

You will be shown the last ~50 or so lines of the file and it will automatically scroll showing the newest information from the logfile.