|

Tips
One thing which i like a lot about vim is: you can just toggle all options. (see inv<TAB>)
nmap ,n :set invnumber
^^
Would bind only the command ,n in normal mode to do the following: If you hit ,n you then will see numbers before your texts. hit it again and the numbering is just gone and so on. the is nice, because you can use Carriage Return without even using control-characters. nmap instead of map is great, because it lets you bind mappings to ":"-commands and extra ones for normal-mode and even extra ones for visual-mode and for operators like c , y and d. vi users have a bad time with vim, because if they don't try to learn the extras, they never get the luxury of vim but have a big editor. But why then use a big vim-editor instead a smaller one like nvi?
|
|
|
Puts time stamp on files and sets it so users cannot create or edit these files:
/bin/touch / .rhosts / .netrc /etc/host.equiv
/bin/chmod 0 / .rhosts / .netrc /etc/hosts.equiv
|
|
|
A very common addition to a webpage is "Last Modified" -- PHP makes this very easy with the following code as an example:
<?php
echo "Last modified: " . date( "F d Y.", getlastmod() );
?>
It checks the modification date of the given file and posts it. Check php.net for date variations.
|
|
|
To redirect to another url yet keep the same file structure, you can use PHP and create the following file. For example: foo.com/bar/ to redirect to shoe.com/bar/.
<?php
$redir = getenv( "REDIRECT_URL");
header( "Location: http://shoe.com$redir");
?>
Works great for domain moves and 404's.
|
|
|
|
If you want to know the different signals that are supported, just run kill -l command
|
|
|
For those who use BitchX alot, and never looked deeper into
the manual/doc files, here's a short example on how to use
the multiple window handling in bX:
/win new hide - This will add a new window (hidden)
Now you can switch to this newly created window, by doing
ALT-[0-9], now you have a clean window for a new
channel, query, etc. When an action happens in another window,
BitchX puts an ACT: <windownumber> in the status bar
(at the right).
|
|
|
|
If you don't like the facility that your window manager has for setting your desktop background, consider using xv for this task. Running xv -max -root -quit image.jpg will set image.jpg to your desktop in maximum resolution. This can be especially handy when setting your background from a cron job.
|
|
|
If you want to set up emacs to scroll through all the buffers add the following line to your .emacs file:
;rotate buffers
(defun rotate-buffers (arg)
"Rotates to the next buffer"
(interactive "p")
(switch-to-other-buffer 0))
|
|
|
less +F file is a great alternative to tail -f, especially when you'll need to browse through the file as well as tail it . . . you can also do this from within less, by typing F.
|
|
|
|
Ever looked at the ~/.Xdefaults file and wondered how to
add your own defaults?
If you you are using Window Maker just right click on a window titlebar and choose attributes. The attributes window will say something like Inspecting rxvt.XTerm. If you don't have Window Maker, you can run xprop and get the info from WM_CLASS(STRING) = "rxvt", "XTerm"
Now, open ~/.Xdefaults in your favorite editor. If you want to change a property for all windows of a class (like all XTerm's), just type:
XTerm*title: My Xterm Title
To change the title for only the rxvt's, type:
rxvt.XTerm*title: My RXVT Specific Title
Don't Forget to run xrdb -load ~/.Xdefaults every time you change your Xdefaults or they will not be activated! Any line begining with a "!" is considered a comment, not a command. Read man rxvt or man xterm to find what other cool things you can set . . .
|
|
|
|
pstree is a good alternative to ps, listing all the processes in a nice tree form. You can also try pstree -hap for command line, pid and to highlight the current process.
|
|
|
|
In FreeBSD the utility systat -vm is a great way to monitor your system, covering most things, especially memory information. In combination with top and/or xosview you will have a great little monitoring setup.
|
|
|
Whenever you download a new rpm, or are feeling paranoid about any you get on a disk/cdrom, check the MD5 sum. If the sum is not OK, then the rpm is corrupted and won't install (at best) or can mess up your system (at worst). Use the following command (wildcards are OK):
rpm -K --nogpg rpmfile-to-check.rpm
where rpmfile-to-check.rpm is whatever rpm you are checking out. Note that the --nopgp directive does not check the signature of the package, if any.
|
|
|
If you are using RedHat (possibly many other distributions as well), to start, stop or restart Samba, issue the following command (as root):
/etc/rc.d/init.d/smb start
For other functions, just substitute stop or restart for start.
|
|
|
Always use the testparm command to test your new smb.conf file. This will alert you to some possible errors. You must give testparm the path to the smb.conf file. For example:
testparm /etc/smb.conf
|
|
|
Friday, 31st of December, 1999, 19:44:00 UTC
Copyright 1998-2000
Scott Parish and
George Lewis.
Send feedback to webmaster@portico.org.
|