Miscellaneous Stuff
FAQ: How do I download the Cisco VPN client?
For some reason, the software can only be downloaded from the Software Center by registered customers.
HOWTO: Uninstall DivX
DivX Version 6.7 installs Applications/DivX/Uninstall DivX for Mac.app that can be used to uninstall DivX. (Installing 6.7 will supposedly upgrade all existing DivX bits.)
INFO: Handling missing methods in various languages
PHP: __call
Perl: AUTOLOAD
Ruby: method_missing
Python: __getattribute__
JavaScript: ???
FF 3+: __defineGetter__
See:
- http://langexplr.blogspot.com/2008/02/handling-call-to-missing-method-in_06.html
- http://langexplr.blogspot.com/2008/02/handling-call-to-missing-method-in.html
- http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Guide:Creating_New_Objects:Defining_Getters_and_Setters
- http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object:_noSuchMethod
- http://blog.iffy.us/?p=43
(This is technically called "intercession".)
INFO: MD5SUM HASH OF A ZERO-LENGTH FILE
d41d8cd98f00b204e9800998ecf8427e
INFO: SHA1SUM HASH OF A ZERO-LENGTH FILE
adc83b19e793491b1c6ea0fd8b46cd9f32e592fc
INFO: MD5SUM HASH OF A FILE WITH A SINGLE NEWLINE
68b329da9893e34099c7d8ad5cb9c940
INFO: SHA1SUM HASH OF A ZERO-LENGTH FILE
da39a3ee5e6b4b0d3255bfef95601890afd80709
HOWTO: FIND FLASH URL
(If a regular "view source" doesn't work or is difficult:) there's probably a better way, but one way is to use Firefox's Firebug add-on, select the "Net" tab, then choose the "Flash" option. This should list all the Flash URLs that appear on the page; right-clicking allows you to copy the location to the clip-board.
REGEXP: PARSE ENTRIES IN A COMBINED LOG FILE
(Perl regexps, but can be adapted.)
Parse a line of the combined logfile:
m{
(\S+)\s # Remote host
(\S+)\s # Remote logname (from identd, if supplied)
(\S+)\s # Remote user
\[(\d{2}/\w+/\d{4}\:\d{2}\:\d{2}\:\d{2}\s+.+?)\]\s # Time
"(\w+\s\S+\s\w+\/\d+\.\d+)"\s # First line of request
(\d+)\s # Status
(\d+|-)\s? # Bytes sent, excluding HTTP headers
(?:"(\S+)"\s # Referer (sic)
"(.+?)")? # User-Agent
}ox;
Parse the first line of the request:
m{
(\w+)\s # Method
(\S+)\s # URL
(\w+\/\d+\.\d+) # Version
}ox;
FAQ: WHAT'S THE SpryMediaUK_Grid COOKIE?
It stores the per-site configuration settings for Spry Media's "Grid" bookmarklet.
HOWTO: Do reverse DNS query for a range of addresses
$ for n in $(seq 1 254) ; do dig -x 217.70.191.$n +short ; done
FAQ: How to convert tabs to spaces?
Change in-place (with filename.txt.bak as a backup):
$ perl -pi.bak -e 's/\t/ /g;' filename.txt
Change tabs to spaces in *.php files, without backups:
$ find . -name '*.php' -exec perl -pi -e 's/\t/ /g;' {} \;
HOWTO: Get soapUI 4.0 working on Ubuntu 11.04
As described in http://aspemo.blogspot.com/2011/05/soapui-on-ubuntu-1104.html, uncomment the line
JAVA_OPTS="$JAVA_OPTS -Dsoapui.jxbrowser.disable=true"
from soapui.sh.