Showing posts with label Other. Show all posts
Showing posts with label Other. Show all posts

2009-08-22

Why Is Google Port Scanning Me?

I’m used to the normal ‘Internet background radiation’ of hackers/bots scanning the common ports on my router (SSH, VNC, etc.) but recently I’ve noticed scans of multiple ports from IPs registered to Google.

e.g., I'm getting a few thousand a day of these:
[INFO] Sat Aug 22 11:43:44 2009 Blocked incoming TCP packet from 66.102.7.191:80 to xxx:47414 as ACK received but there is no active connection
[INFO] Sat Aug 22 11:43:44 2009 Blocked incoming TCP packet from 66.102.7.191:80 to xxx:15370 as ACK received but there is no active connection
[INFO] Sat Aug 22 11:43:44 2009 Blocked incoming TCP packet from 66.102.7.191:80 to xxx:63879 as ACK received but there is no active connection
[INFO] Sat Aug 22 11:43:44 2009 Blocked incoming TCP packet from 66.102.7.191:80 to xxx:7748 as ACK received but there is no active connection
Looking back I see these requests have been coming for months but have increased in frequency recently.

They come from a range of IPs which whois reports are assigned to Google:
66.102.7.101
66.102.7.191
74.125.15.22
74.125.15.93
74.125.15.100
74.125.15.157
74.125.19.118
74.125.103.33
74.125.103.96
74.125.103.97
etc.
So for what purpose is Google port scanning me?

UPDATE:
These are likely just delayed responses to a web page request made by your browser just before you quit your web browser.

2009-08-02

Unhelpful Error Messages

Trying to access BD-Live on my Blu-ray player. This is an unhelpful error message from The Mummy: Tomb of the Dragon Emperor (2008) that had me wondering where the error was:

This feature is only available on BD-Live enabled players.  Please ensure that your player is connected to the Internet before re-starting the disc.  Your player must be profile 2.0 or greater.  Check with your manufacturer for firmware updates to enable this feature.  Watch the registration and BD-Live user guides on this disc for more information on how to connect to the BD-Live community.

Trying with Men in Black (1997) was much more informative and though not 100% correct put me on the right track—I needed to insert a memory stick:

Your player does not have enough storage space for the download.  Please delete some files and try again.

And after all that BD-Live was a big disappointment: the sparse amount of content which was actually avaiable could just have easily been included on the disc rather than waiting on a download—especially as the downloaded content is locked away until you re-insert the disc.

2008-07-03

Give Kids Praise, Not Sweets

If you want to reward a child, give them your praise and not a sweet. This can be hard but remember:
  • Your praise is valuable.

  • By giving a sweet you are devaluing your praise (both to the child and yourself): they will learn to seek sweets and not praise.

  • By making sweets something to work hard for you are increasing their perceived value.

  • The child will learn to expect a sweet when they’ve done something well.
A similar message applies to children who have hurt themselves or are going through an unpleasant experience (e.g. the dentist): give them some love, not a lolly.

Penelope Leach summaries this well in her excellent Baby & Child book (page 309):
If you can keep sweets out of the emotional arena and treat them as coolly and calmly as you treat other particularly nice-tasting things such as strawberries or honey, none of this trouble will arise. Many children passionately enjoy strawberries and will eat as many as they can get during their short season. But how many of those children whine and cry and throw tantrums for strawberries?

2008-06-01

Thought on Building Identification from the Air

On trying to identify buildings for an upcoming trip in Google Earth I was struck with the obvious thought: when are businesses going to start making themselves identifiable from the air—for instance with signage painted on the roof?

2007-09-04

Fun News Error

From the Radio New Zealand News site this morning:

Independent testing for formaldehyde on a range of clothes has shown undetectable levels of the chemical.

2007-07-16

Accessing Windows PowerShell from SAS

Windows PowerShell, previously Microsoft Shell or MSH (codenamed Monad) is an extensible command line interface (CLI) shell and scripting language product developed by Microsoft.—Wikipedia

PowerShell provides ‘easy’ access to Windows via a command line, and can be used for many things. I wanted to find the total disk space and amount free which we can do like this:
get-wmiobject -class win32_logicaldisk
Outputs:


DeviceID : A:
DriveType : 2
ProviderName :
FreeSpace :
Size :
VolumeName :

DeviceID : C:
DeviceID : C:
DriveType : 3
ProviderName :
FreeSpace : 221132865536
Size : 293552017408
VolumeName :
PowerShell uses STDIN and STDOUT, which is how we can pipe it into SAS. Note adding the filter to restrict to local, non-removable, drives:
filename diskinfo pipe "powershell get-wmiobject -class win32_logicaldisk -filter 'DriveType=3'";

data _null_;
infile diskinfo;
input;
put _infile_;
run;
Which yields (note the 2 leading blank lines):


DeviceID : C:
DriveType : 3
ProviderName :
FreeSpace : 221132881920
Size : 293552017408
VolumeName :
PowerShell can reformat output, but I coded SAS to read it as-is:
data _null_;
infile diskinfo firstobs=3 truncover;
input
@':' +1 DeviceID $1.
/
/
/ @':' +1 FreeSpace 32.
/ @':' +1 Size 32.
/ @':' +1 VolumeName $32.
/;

put _all_;
run;
Which gives us variables holding the total size of the C drive (in bytes) and free space:
DeviceID=C FreeSpace=221132861440 Size=293552017408 VolumeName=  _ERROR_=0 _N_=1

2007-07-13

Being a SAS Data Warehouse Administrator

Somebody asked me what made a SAS data warehouse programmer different from a normal SAS programmer—was it the amount of SAS knowledge I had?

The short answer was no, it’s all about experience. Here’s a rough longer answer based on my data warehousing experience at 4 different organisations:
  • Strong base SAS and macro is essential, this is what the majority of data warehouse jobs use.

  • Also important is a strong knowledge of how SAS works internally. What gets written to the log in the following sample, and why?
    data _null_;
    log 'hi';
    set work.test(obs=1);
    run;
  • A general knowledge of SAS and the ability to learn more as needed: e.g. I also use ODS and Graph on a regular basis.

  • General knowledge: operating system knowledge (mainframe/Unix/Windows), SQL, reading from different formats (CSV, XML…), writing to various formats (Excel, HTML, XML…), version control, backup…

  • Awareness of machine resources and scheduling

  • Understand the big picture: can you justify creating an index (space and time vs. potential usage & savings)? Should you create another data set for new data or combine with an existing one? When should you create a macro for a common routine vs. a pre-summarised data set?

  • Consistency: users need to be able to transfer their knowledge from one part of the warehouse to another. Don’t make it hard for them.

  • Work within the existing warehouse setup: if the naming standards are CamelCase (my preference), don’t create Underscore_Names.

  • It’s about doing it right

  • Documentation. The ‘d’ word! I try to create clear and commented code, easy-to-use data sets, and document what I’ve done. My goal is to make myself redundant (which hasn’t worked!)

  • Communication: essential within your team, to users, and management. Sometimes users and/or managers will have an exact requirement but it should be implemented in a different way to fit the overall picture—you need to spot these and be able to explain why.

  • After hours work: users don’t like losing the warehouse to maintenance during working hours!

2007-07-07

Bridge to Nowhere^h^h^h Terabithia

You have not stumbled into Narnia—don’t believe the trailer.

This is a coming of age movie, and as that succeeds well. However it is NOT a fantasy movie as portrayed in the trailer: the fantasy elements only make up about 10 minutes of movie time.

Take your pre-teens, not your younger kids looking for a good fantasy.

2007-06-20

Alice’s Adventures in iPodland

A couple of years ago I wrote a SAS program to convert a Gutenberg text of Alice’s Adventures in Wonderland to an iPod eBook (iStory).

The SAS program takes the Gutenberg text file, combines hard lines into paragraphs, extracts the chapter numbers and names, and splits the whole lot into pages by chapter. It then generates a preface, table of contents, and puts Prev/Contents/Next on all the pages.

I was wondering what to do with it tonight and found a site which specialises in converting these texts to various formats: manybooks.net. Their Alice text is a lot cruder than mine—it's just a set of pages with Next/Prev—but it gets the job done and there’s a whole library there.

So here’s mine for posterity. The concept’s been superseded but it was a good learning exercise in how iPod Notes work. You can read how to install it and more about Notes at MAKE.

Download the nicely formatted version of Alice’s Adventures in Wonderland.zip

2007-06-04

Minimum DVD Burn Speeds

I needed to burn a DVD at a slow speed for a project I’m working on—the DVD will be used as the master for some 3,500 copies so quality is important. The factory said the slower the burn the better the recording, that you can actually see the difference on the DVD surface when burning at higher speeds, and that a DVD burnt at high speeds may work OK in some computers but malfunction in others. They suggested 1× but we’ve compromised on 4×.

The reason for the compromise is the drive in my MacBook Pro won’t go any slower. Here’s an interesting matrix of drives, DVD-R medium, and the resulting available burn speeds, put together by a colleague (thanks Glenn).

Table of Drives vs. Media = Burn Speeds

Drive
Apple 4×
Transonic 8×
Verbatim 8×
Imation 16×
HL-DT-ST GWA-4080444, 64, 6
HL-DT-ST GWA-41652, 44, 84, 84, 8, 16
Matshita UJ-8151, 21, 21, 21, 2
Matshita UJ-8251, 2, 41, 21, 2, 41, 2
Matshita UJ-8351, 2, 41, 21, 2, 4, 81, 2
Matshita UJ-8461, 2, 41, 21, 2, 4, 81, 2
Pioneer 1041, 21, 21, 21, 2
Pioneer 1061, 2, 4
Pioneer 1091, 2, 444, 6, 84, 6, 8, 12, 16
Sony DW-U10A1, 2, 41, 2, 41, 2, 41, 2, 4

All tests were done using Disk Utility in OS X 10.4 (Finder and hdiutil will give the same result).

My MBP has an HL-DT-ST GWA4080MA DVD drive, so the minimum burn speed is 4×.

(You can see the drive mechanism in System Profiler. Apple can (and does) change mechanisms within a product line.)

2006-11-30

Solar Hot Water in Hot Water?

It looks like there’s an endemic problem using solar hot water panels in Wellington—it would appear there’s too much salt in our air, which is corroding the panels.

Gary Moller has discovered and published findings in his blog:

http://healthandlifestyle.co.nz/solarpanel/

It’s hard to see through the glass, but this is what our Solahart Black Chrome XII looks like after 6 years:

Corroded Solar Panel

‘Corrosion’ should probably be in quotes, as the panel hasn’t been opened up to confirm this, and the dealer is still investigating.

Not having long-term monitoring in place it’s hard to pin down what effect this is having, but I estimate we’re losing 10–15° of solar heating.

At least Mander Plumbing organised a building certificate for our work (unlike some of Gary’s exhibits). They no longer deal in Solahart gear, so I’m taking this up with the new agent (Spinks Energy Systems).

I certainly don’t want to see the burgeoning solar hot water movement collapse, but feel it’s better the problem is raised now rather than later (can you say Leaky Building Syndrome).


Followup 2007-02-13:

We recently had our corroded Solahart panels replaced under warranty.

In the past (years ago) we used to regularly get over 60° during summer. Just prior to replacement this was never reached.

Since the panels have been replaced we're back to regularly achieving over 60°, some days as high as 75°.

i.e. The corrosion was causing a temperature drop of up to 15°.

(Temperature as measured on the remote readout in the cylinder.)

2006-06-05

Homepage Visualisation

My homepage as a graphicI received a link to a very cool web visualisation tool by Sala (although I used the version by Markavian which enables you to click on a dot to see the source tag): this Java applet represents a web page and its elements as coloured dots.

It’s a quick way to get a feel for the kind of HTML used (tables, or divs, etc.), the complexity of the page, number of images, and more.

My home page is pictured:

The black dot is the root node.

Going up from there we have a grey dot for the <head>tag, which is the parent for many other grey dots—the <title> and <meta> tags, etc.

Going down is the grey dot for the <body>.

On the right we have a red dot for my main menu which is a <ul> tag, with a large cluster of pink dots for the individual <li> elements, and blue dots for their respective links. Note the other two small groups for the submenus.

Going (mostly) down from the root we have a green dot for a <div> tag, which encloses the footer (the two orange dots for <p>).

On the left we have a green dot for the <main> section, immediately surrounded by paragraphs (orange), one of which links to the cowboy picture (violet).

The left most orange dot is the paragraph containing the icons (violet) at the bottom of the page. Each icon is inside a link tag (blue).

2006-04-01

Hide Google Searches from the Government

Even though in its recent demands the US Government only asked for aggregated data, and even though Google initially refused to supply it and the courts supported the privacy of Google’s users, it still made me think about Google tracking the IP address of every search we make.

Although there are anonymiser services available, here’s a different approach: simply have a program lay a false trail. If your search records at Google are ever examined, nobody will be able to tell what were genuine searches, and which ones were false trails.

Every x minutes, this OS Ⅹ AppleScript picks random words from the dictionary, and emulates a Google toolbar search being carried out from Safari on those words. If the dice rolls right, it selects the ‘I’m Feeling Lucky’ option to actually visit the random site. It also sleeps the same hours I do ;-)

It works fine from a user account which has been ‘switched out’ via FUS. No guarantees; second opinions and modifications welcome; and yes, I know I’m paranoid. There is one minor bug—sometimes Safari downloads a ‘dictionary’ page instead of displaying it.

Of course, you don’t need to run it all the time—just by having it on your machine you can claim searches were made by the program and not you!

property Linefeed : ASCII character 10 -- Unix
property web2 : alias (("" as Unicode text) & (path to startup disk) & "usr:share:dict:web2")


set DictWords to read web2 using delimiter {Linefeed}
set DictLength to length of DictWords

repeat
set SearchWords to ""
set NumberWords to random number from 1 to 5 -- Pick a number for words to search on

repeat with i from 1 to NumberWords -- Lookup the words and concatinate them in a search string
set ThisWord to item (random number from 1 to DictLength) of DictWords

if SearchWords = "" then
set SearchWords to ThisWord
else
set SearchWords to SearchWords & "+" & ThisWord
end if
end repeat

set FeelingLucky to (random number from 1 to 2) = 2 -- Decide if we’re going to use the ‘I’m Feeling Lucky’ option

if FeelingLucky then
set URLString to "http://www.google.co.nz/search?hl=en&q=" & SearchWords & "&btnI=I%27m+Feeling+Lucky&meta="
else
set URLString to "http://www.google.com/search?q=" & SearchWords & "&ie=UTF-8&oe=UTF-8"
end if

tell application "Safari"
open location URLString

repeat -- Wait here until the page has finished loading
delay 5
set WindowName to name of front window
if WindowName is not "Untitled" and WindowName does not start with "Loading “" then exit repeat -- Takes a few seconds to switch from Untitled to Loading
end repeat

close front window
end tell

if time of (current date) ≥ 79200 then delay 8 * hours -- If past 2200, sleep for 8 hours

delay (random number from 1 to 14400) -- Up to 4 hours, don’t set too low
end repeat

2004-06-28

Shrek 2

Shrek 2 was a predictable disappointment for a sequel. Just a Sunday afternoon television love movie with the main characters wearing orge suits.

Oh sure, there were some nice scenes, and the kids enjoyed it (stay for the credits for the funniest part of the movie), but the dialog and situations weren’t as funny as the original.

Donkey as a horse just looked too bizarre.

And hey guys, a few tributes to other movies is nice, but too many is plagiarism, particularly copying the music video of Holding Out for a Hero.