Christchurch Webcams

Found these really good web cams in Christchurch. Hosted by Yobbo.co.nz . http://www.yobbo.co.nz/webcams.htm

The locations are pretty good and you can change the view as well. Please don't abuse it and support the guy hosting it.

I herd there was a storm coming in Christchurch. Looking at the yachts might be interesting.

[tags]Webcams, axis, location, geo, location, live, streaming, video, cam, new zealand, christchurch[tags]

Google Font

Want you own little google search engine? Here is how i created mine


shoaib.no-ip.org

Downloading and Uploading files recursively using ncftp

I shamelessly copied this article for my own personal reference from http://www.linux.com/articles/52714 . Instead of having to google all the time.

===================================================================
Author: Peter Leung on March 14, 2006 (8:00:00 AM)

Next, I turned to command-line FTP clients. Again, the standard FTP command doesn't support recursive directory upload. Fortunately, many graphical and command-line FTP clients do, including NcFTP, yafc, and LFTP. I picked NcFTP.

After installing the software, connect to your host anonymously by entering the ncftp command followed by the hostname:

ncftp ftp.somedomain.com

or if you need to log in with a valid username, use the -u and -p parameters:

ncftp -u username -p password ftp.somedomain.com

Windows Games on OSX using CrossOver Games

Very surprising results after installing Crossover Games, on my AMD Hackintosh OSX Leopard. I was able to run Counter Strike Source very effectively! No loss of FPS even in Window mode. I was able to play a movie on the dual screen while playing the game as well.
Counter Strike Source running on Mac OSX using Crossover Games
Pros

  • Less to minimum configuration required
  • Easy install
  • Equivalent graphics rendering to windows
  • Quick launch programs
  • Optimum CPU utilization and memory resource allocation.

Cons

  • Audio didn't work (but thats okay - i play games without audio anyway)
  • Load times were a bit slow
  • A bit laggy when dragging windows
  • Only available for Intel versions of OSX not for G4, G5 or any PPC based hardware

A webserver in 1 line of code

Believe it or not, here is a simple webserver in 1 line of shell code. This is nothing new but fascinating.


:;while [ $? -eq 0 ];do nc -vlp 8080 -c'(r=read;e=echo;$r a b c;z=$r;while [ ${#z} -gt 2 ];do $r z;done;f=`$e $b|sed 's/[^a-z0-9_.-]//gi'`;h="HTTP/1.0";o="$h 200 OK\r\n";c="Content";if [ -z $f ];then($e $o;ls|(while $r n;do if [ -f "$n" ]; then $e "`ls -gh $n`";fi;done););elif [ -f $f ];then $e "$o$c-Type: `file -ib $f`\n$c-Length: `stat -c%s $f`";$e;cat $f;else $e -e "$h 404 Not Found\n\n404\n";fi)';done

Similar webserver I found written in ruby. Being the sys-admin type of guy; I admire the power of shell over any other programming language.

# From: http://www.ntecs.de/blog/articles/2008/02/09/the-worlds-smallest-webserver
# Author: Michael Neumann
# ... point your browser to http://localhost:3125/etc/motd


ruby -rsocket -e 's=TCPServer.new(5**5);loop{_=s.accept;_<<"HTTP/1.0 200 OK\r\n\r\n#{File.read(_.gets.split[1])rescue nil}";_.close}'

Sniffing keyboard signal using electromagnetics

This is nothing new to me but for some its perfect demonstration of what electromagnetic can do to assist hackers. I've known about this for 5+ years now - never really saw it being done but its been done easily in the past by hackers. That is why big corporations now insulate their server rooms from outside signals.

Also, this is not limited to keyboards, you can also do similar hack on network cables, atm machines and tv remotes etc. Here is a demonstration video.

"We conclude that wired computer keyboards sold in the stores generate compromising emanations (mainly because of the cost pressures in the design)," they write here. "Hence they are not safe to transmit sensitive information."

Java MemoryAnalyzer (MAT)

Another fascinating tool I stumbled upon. Never thought I would ever need anything like this but this was very useful for a secret project I am working on.

This memory analyzer gives you a good overview of your memory utilization based on segments. Which objects are using how much memory and whats garbage collector up to.
MAT
It reads in dump files - on OSX they suggest using jmap.

So far it will tell you :-

What are the sizes of the collections, which my objects are keeping?

What is the fill ratio of the collections held by my objects?

Are the hash functions of my objects really working fine?

An easy way to look at the content of HashMaps
Arrays!
* "Arrays Grouped By Size" - works on both primitive and Object arrays
* "Array Fill Ratio" - does not work on primitive arrays. Provides the ratio between non-null elements in the arrays and the length of the arrays

SEO

I have been doing a bit of research and reading on SEO. Stumbled upon a quite a few neat tricks webmasters are using these days to increase their ranks on google search. In process I've managed to hack a few of my own (will post later). So I will wait for how effective they turn out to be sharing.

Also, came across this tool which in the past was only available via Google Adwords account, but now you can use it externally https://adwords.google.com/select/KeywordToolExternal .

It allows you to generate a nice keywords list in a comma seperated fashion which you can then put it in your meta tags.

Java and JDBC

I used something Ruby | Rails taught me in m java jdbc assignment. It's not related to rails in any way then SQL in general. It's the concept of using Prepared statements.Really useful in this particular scenario.

public String showLoanedBooks() {
public String showLoanedBooks() {
PreparedStatement sa = null;
PreparedStatement sb = null;

String result = "";
boolean r = false;
String selectbooksql = "SELECT DISTINCT ISBN, Title, Edition_No, NumofCop, NumLeft FROM Book NATURAL JOIN Cust_Book;";
String selectauthorsql = "SELECT Surname FROM Author NATURAL JOIN Book_Author WHERE ISBN = ? ORDER BY ISBN;";
String selectcustomersql = "Select CustomerID, L_Name, F_Name, City from Customer natural join Cust_Book WHERE ISBN = ? ;";
try{
result = "Show Loaned Books: \n\n";

Statement s = con.createStatement();
sa = con.prepareStatement(selectauthorsql);
sb = con.prepareStatement(selectcustomersql);

ResultSet rs = s.executeQuery(selectbooksql);

while (rs.next()){
r = true;
//Going through each book Book

Stealing live stream!

If you ever need to steal a streaming video then mplayer is the tool of choice.

I had to recently steal some streaming lecture videos from MIT for educational purposes off course. As lecturers at my university can't teach for shit.

Any way here is how you do it


mplayer -dumpstream -dumpfile "File Name Here.rm" "URL Here"

In case of MIT lecture videos I had todo the following


wget http://mfile.akamai.com/7870/rm/mitstorage.download.akamai.com/7870/18/1...

Once' you've got the .rm file you have to open it up! The real deal is inside it.


more strang-1806-lec21-29oct1999-220k.rm
rtsp://a757.v7870e.c7870.g.vr.akamaistream.net/ondemand/7/757/7870/v0001/mitstorage.download.akamai.com/7870/18/18.06/videolectures/strang-1806-lec21-29oct1
999-220k.rm
--stop--
pnm://a757.v7870e.c7870.g.vr.akamaistream.net/ondemand/7/757/7870/v0001/mitstorage.download.akamai.com/7870/18/18.06/videolectures/strang-1806-lec21-29oct19
99-220k.rm

Syndicate content