iptables (blocking an IP Address)
September 20th, 2007Just a quick one here:
To successfully block an IP address, the syntax would be:
iptables -I INPUT -s IP_ADDRESS_HERE -j DROP
SSH Timeout
September 20th, 2007How to set up a session timeout. Pretty handy if you’re using SSH sessions.
Using sudo to execute commands through PHP scripts
September 20th, 2007Execute visuodo
Add/append commands for this user (e.g.)
* www-data ALL=NOPASSWD: /etc/init.d/network start, /etc/init.d/network stop
Where:
* www-data : Username allowed to run commands as root
* ALL: Hostname (run from any host)
* NOPASSWD: Do not ask for password, as script can not supply password
* /etc/init.d/network start, /etc/init.d/network stop: Commands separated by comma
Save and exit from visudo command. Now here’s a sample test.php script:
RIGHT CLICK AND SAVE THIS LINK
Upload this to your server, run it and see how it works.
Reducing the size of Excel files
September 20th, 2007This is great:
http://www.ozgrid.com/Excel/ExcelProblems.htm
Check out the “FREE Excel file size reducer". It helped me reduce an ever increasing spreadsheet from 13Mb to 1.4Mb! Without the loss of any information at all. I’m really chuffed about this.
If it disappears, you can get it here:
http://www.rosbif.org/store/File_Size_Reducer.zip
All the instructions are inside the zip file.
HP LaserJet 4M Plus under CUPS and Linux?
September 20th, 2007Check this out then.
https://wiki.ubuntu.com/HardwareSupportComponentsPrintersHp
What it’s saying, is to use the standard LaserJet 4M driver (hpijs) and don’t choose LaserJet 4M when installing the printer. The postscript driver won’t work.
Oh, for me in CUPS, it was listed as the foomatic driver too.