Block IP address using .htaccess for Apache or using url.access-deny for Lighttpd
For Apache Web Server, edit the .htaccess per directory:
Allow access from a certain IP address:
In this case, stands for a specific IP address. For example:
order deny,allow
deny from all
allow from 192.168.1.2
Deny access from a specific IP address:
order allow, deny
allow from all
deny from 192.168.1.2
For multiple IP addresses:
order deny,allow
deny from all
allow from 192.168.1.2 192.168.1.3
allow from 192.168.1.4
For Lighttpd web server:
Edit lighttpd.conf
$HTTP[“remoteip”] == “192.168.1.2″ {
url.access-deny = ( Ҡ)
}
Do not allow IP address 192.168.1.2, 192.168.1.3 to access our site:
$HTTP[“remoteip”] =~ “192.168.1.2|192.168.1.3″ {
url.access-deny = ( Ҡ)
}
or
$HTTP[“remoteip”] == “192.168.1.2|192.168.1.3″ {
url.access-deny = ( Ҡ)
}
Allow ONLY IP addresses, 192.168.1.2, 192.168.1.3 to access,
note the != which means ‘string does not match’ operator basically – IF remoteip is not
192.168.1.2 or 192.168.1.3, THEN deny:
$HTTP[“remoteip”] != “192.168.1.2|192.168.1.3″ {
url.access-deny = ( Ҡ)
}
Reference:
http://www.htpasswdgenerator.com/apache/htaccess.html
http://www.cyberciti.biz/tips/lighttpd-restrict-or-deny-access-by-ip-address.html
http://redmine.lighttpd.net/wiki/1/Docs:Configuration
http://perishablepress.com/press/2006/01/10/stupid-htaccess-tricks
Windows 8 Beta ISO Download
Windows Developer Preview with developer tools English, 64-bit
(x64)
DOWNLOAD (4.8 GB)
Sha 1 hash – 6FE9352FB59F6D0789AF35D1001BD4E4E81E42AF
All of the following come on a disk image file (.iso). See below for
installation instructions.
- 64-bit Windows Developer Preview
- Windows SDK for Metro style apps
- Microsoft Visual Studio 11 Express for Windows Developer
Preview - Microsoft Expression Blend 5 Developer Preview
- 28 Metro style apps including the BUILD Conference app
Windows Developer Preview English, 64-bit (x64)
DOWNLOAD (3.6 GB)
Sha 1 hash – 79DBF235FD49F5C1C8F8C04E24BDE6E1D04DA1E9
Includes a disk image file (.iso) to install the Windows Developer
Preview and Metro style apps on a 64-bit PC.
Windows Developer Preview English, 32-bit (x86)
DOWNLOAD (2.8 GB)
Sha 1 hash – 4E0698BBABE01ED27582C9FC16AD21C4422913CC
Includes a disk image file (.iso) to install the Windows Developer
Preview and Metro style apps on a 32-bit PC.
System Requirements
Windows Developer Preview works great on the same hardware that
powers Windows Vista and Windows 7:
- 1 gigahertz (GHz) or faster 32-bit (x86) or 64-bit (x64)
processor - 1 gigabyte (GB) RAM (32-bit) or 2 GB RAM (64-bit)
- 16 GB available hard disk space (32-bit) or 20 GB (64-bit)
- DirectX 9 graphics device with WDDM 1.0 or higher driver
- Taking advantage of touch input requires a screen that
supports multi-touch - To run Metro style Apps, you need a screen resolution of 1024
X 768 or greater
Notes about installing the Windows Developer Preview
- You can’t uninstall the Windows Developer Preview. To
reinstall your previous operating system, you must have restore
or installation media.
LinuxCommand.org: Learn the Linux command line. Write shell scripts.
http://linuxcommand.org/index.php
Okean Sino-Korea and DShield Top 20 Blocklist for Rocky Arno’s IPtables blockhosts file
#!/bin/sh
# script created from technese.com
# Download Okean Sino-Korea Block IP list
rm -f /tmp/cnkr_htaccess.txt
rm -f /tmp/top10-2.txt
wget http://www.okean.com/antispam/cnkr_htaccess.txt -P /tmp
file=/tmp/cnkr_htaccess.txt
file2=/tmp/top10-2.txt
tempfile=/etc/arno-iptables-firewall/blocked-hosts
# Remove first and last lines, and "deny from " text
echo '#Okean Sino-Korea Block IP list:' `date`'' > $tempfile
sed -e '1d' -e 's/deny from //' -e '$d' < $file >> $tempfile
# Append DShield Top 20 IPs
echo '#DShield Top 20 IP Block :' `date`'' >> $tempfile
wget http://feeds.dshield.org/top10-2.txt -P /tmp
# print first column and add /24 to DShield IPs
awk '{ print $1 }' < $file2 | sed 's/$/\/24/' >> $tempfile
Download and rename with .sh file type:
Reference:
http://www.okean.com
http://dshield.org
Bash script to create a .m3u from a directory
#!/bin/bash
dir=`echo ${PWD##*/}`
echo "Create a .m3u playlist for $dir ..."
ls *.mp3 -1 >> "$dir.m3u"
ls *.mp4 -1 >> "$dir.m3u"
ls *.m4v -1 >> "$dir.m3u"
echo "Found these media files:"
cat "$dir.m3u"
iPhone, iPod, iPad and Firmware Download Links
http://www.felixbruns.de/iPod/firmware
http://www.iclarified.com/entry/index.php?enid=750
Basename or extract of current working directory – Linux command output
Four examples:
$ basename `pwd`
$ pwd | awk -F/ '{print $NF}'
$ pwd | sed 's#.*/##'
$ echo "${PWD##*/}"
Reference:
http://stackoverflow.com/questions/1744595/extract-the-last-directory-of-a-pwd-output
http://tldp.org/LDP/abs/html/parameter-substitution.html
html index page of tree view of directory
-H : turn on html
baseHREF : gives the base ftp location when using HTML output.
-o : output filename
$ tree -H baseHREF -o index.htm
create index.htm of current directory and output filename as index.htm
$ tree -H . -o index.htm
wget download specific filetype from URL
-U , user-agent
-r , recursive
-l1 -one level
-A , filetype
$ wget -U Firefox -r -l1 -nd -e robots=off -A filetype http://domain.index.html
e.g.
$ wget -U Firefox -r -l1 -nd -e robots=off -A .txt http://technese.com/index.html
multiple filetypes
$ wget -U Firefox -r -l1 -nd -e robots=off -A filetype1,filetype2 http://domain.index.html]
e.g.
$ wget -U Firefox -r -l1 -nd -e robots=off -A .txt,doc http://technese.com/index.html
SQL Coding Guidelines
http://www.unifiedasp.net/index.php/sql-coding-guidelines