Marketing vs Piracy

“Why is it ‘marketing‘ when a company helps itself to my information against my will and ‘piracy‘ or ‘industrial espionage‘ if I helped myself to THEIR information against their will ?”

Roads and Maritime Services—Online Renewals (Privacy)

Privacy Statement

Service NSW is collecting your personal information on behalf of Roads and Maritime Services in order to process your renewal of your vehicle registration. Roads and Maritime Services may retain your personal information and use it for purposes related to its other regulatory functions, for example driver licensing and road transport purposes. Service NSW will retain your personal information for purposes related to its customer service functions.

Under road transport legislation you are required to provide your personal information and your application may be refused unless you do so.

Service NSW and Roads and Maritime Services may disclose your personal information in order to verify or assess your application. We may disclose your personal information to other road transport licensing or registration agencies, in respect of vehicle accidents and incidents (for example lawyers, insurers and investigators), to confirm any compulsory insurance is current, to anyone proposing to acquire an interest in your vehicle, in respect of inquiries relating to stolen or abandoned vehicles, and to any joint registered operator of your vehicle. Otherwise Service NSW and Roads and Maritime Services will not disclose your personal information without your consent unless authorised by law.

Your personal information will be held by Roads and Maritime Services and Service NSW at:

  • Roads and Maritime Services -101 Miller St, North Sydney NSW 2060. Tel 13 22 13
  • Service NSW – L2, 66 Harrington St, The Rocks NSW 2000. Tel 13 77 88

You have the right to access and correct the information if you believe that it is incorrect.

Roads and Maritime Services—Online Renewals (T&C)


  1. These Terms Apply: These Terms and Conditions, together with the Terms of use, Copyright statement and Privacy statement published on the Service NSW website (“Terms”), set out the conditions that apply to your use of the service allowing online application for vehicle registration (“Service”). By using the Service, you agree to comply with these Terms together with all relevant guidelines, instructions and procedures from Service NSW and Roads and Maritime Services (“Instructions”). Nothing in these Terms limits or qualifies your rights or obligations under any legislation, including legislation relating to motor vehicles, traffic, roads or road transport.
  2. Changing these Terms: Roads and Maritime Services and Service NSW may change these Terms or their Instructions from time to time by republishing them online. You agree that by doing this, you have been provided with sufficient notice of the variation. You should read the Terms and Instructions each time before you use the Service in case they have changed. If you do not agree to any change, you should not continue to use the Service.
  3. Preconditions – clear funds: You acknowledge and agree that your vehicle registration will not be renewed until the registration fee is received in clear funds. Your vehicle’s registration may not be renewed if your funds have not cleared before the expiry date of your current registration. If you are paying via BPAY, you must allow 3 business days for Roads and Maritime Services to receive your cleared funds. You warrant that you are entitled to use any credit card for which you have provided details.
  4. Payment: All amounts are stated in Australian dollars and are inclusive of GST. You acknowledge that if you do not pay the correct vehicle registration fees (including where your financial institution declines or reverses payment or has not made the payment because you have not complied with its terms and conditions), Roads and Maritime Services may cancel your vehicle registration.
  5. Preconditions – concession eligibility declaration: If you are claiming a concession on your registration fees, you declare that you are eligible for that concession. You acknowledge and agree that your application for a concession is subject to Roads and Maritime Services verifying your concession entitlement and you agree to promptly provide all necessary information to assist Roads and Maritime Service with verification. If you do not do so, you acknowledge that Roads and Maritime Service may cancel your registration.
  6. Preconditions – correct information: You warrant that all information, including personal information, that you provide in applying for vehicle registration is accurate, true and complete and, to the extent that it includes information about other people, you are authorised to disclose it to us for the purposes for which you have disclosed it.
  7. Incorrect information: You are responsible for any additional expenses you may incur if you submit incorrect information and Roads and Maritime Services or Service NSW act upon it. For example, if you submit an incorrect BPAY payment, your vehicle registration may not be renewed, or if you enter the wrong Roads and Maritime Services billing number the registration for the wrong vehicle may be renewed.
  8. Security of Information: You are responsible for taking reasonable care in how you access the Service, including using appropriate firewalls and anti-virus software. No data transmission over the Internet can be guaranteed as totally secure and communications to this Service may be intercepted or altered in transit. Although Road and Maritime Services and Service NSW strive to protect such information, they do not represent or warrant and cannot ensure the security of any information which is transmitted when you use the Service. When using this Service you transmit and receive information at your own risk and Roads and Maritime Services and Service NSW bear no liability.
  9. Unavailability of Service: You acknowledge and agree that from time to time the Service may be unavailable.
  10. Age: You warrant that you are aged 18 or over. If you are under 18, you may ask us to provide online services only with the involvement of a parent or guardian.
  11. Jurisdiction: These Terms, and your online application for renewal of vehicle registration are governed by the laws of New South Wales, Australia, and you irrevocably submit to the jurisdiction of the courts of New South Wales.
  12. General: A reference to any legislation includes all delegated legislation made under it, including regulations and rules, and amendments, consolidations, replacements or re-enactments of any of them. A reference to an entity, whether statutory or not, which ceases to exist or whose powers or functions are transferred to another body is a reference to the body which replaces it or which substantially succeeds to its powers or functions. Specifying anything in these Terms after the words ‘include’ or ‘for example’ or similar expressions does not limit what else is included.

using variables on the command line

Following on from my last example of copying a SSH public key to a remote computer, this is something I need to do when setting up a new computer. Setting up private/public keys for SSH just make logging in that little bit smoother.

When you need to rerun the command, you need to load it up, edit it and resubmit it. Unfortunately (although it’s probably possible) I don’t know an easy way to bring up a previous command and edit it in-line so that I can send it again without actually sending the command again before doing so.

Instead, Load a variable into the command line and change it next time.

-- 11:03:01 -- MBP:~ madivad$ ssh minixbmc
Last login: Mon Apr 25 18:23:18 2016
minixbmc:~ madivad$ exit
Connection to minixbmc closed.
-- 11:03:17 -- MBP:~ madivad$ remote=minixbmc
-- 11:03:26 -- MBP:~ madivad$  history | grep remote
  439  remote=he1000
  440  cat ~/.ssh/ | ssh madivad@$remote "mkdir -p ~/.ssh && cat >> ~/.ssh/authorized_keys"
  502  remote=minixbmc
-- 11:03:34 -- MBP:~ madivad$ !440
cat ~/.ssh/ | ssh madivad@$remote "mkdir -p ~/.ssh && cat >> ~/.ssh/authorized_keys"
-- 11:03:40 -- MBP:~ madivad$ ssh minixbmc
Last login: Tue Apr 26 11:03:12 2016 from
minixbmc:~ madivad$

For example, in the above session, for simple commands, I would being the history file up, reissue line 440, then edit, then issue it again. In this situation, it would have the effect of loading the key again, and that’s not what I want to do.

  • Breaking it down, I logged into the remote machine and realised a password was needed,
  • I logged out,
  • I set the “remote” variable,
  • looked for the relevant history command (I knew it had the word “remote” on it),
  • I re-issued that line, and
  • then tested the login.
  • No password was needed, the command was a success.

This could be done with other things as well where you’re always changing one element on the line (or multiple elements, and use multiple variables).

For a more simple and silly example, let’s create a quick update and install script for ubuntu:

upstall=’htop multiwatch’
sudo apt update && sudo apt install $upstall

Instead of typing the whole line next time, I can just type the new apps to install in the “upstall” variable and reissue the command (in this case, using arrow up a couple of times, or grabbing the index from the history file).

$ sudo apt update && sudo apt install $upstall
[sudo] password for madivad:
Hit:1 xenial InRelease
Get:2 xenial-updates InRelease [92.2 kB]
Hit:3 xenial-backports InRelease
Get:4 xenial-security InRelease [92.2 kB]
Fetched 184 kB in 1s (101 kB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
All packages are up to date.
Reading package lists... Done
Building dependency tree
Reading state information... Done
byobu is already the newest version (5.106-0ubuntu1).
htop is already the newest version (2.0.1-1).
multiwatch is already the newest version (1.0.0-rc1+really1.0.0-1).
0 to upgrade, 0 to newly install, 0 to remove and 0 not to upgrade.

If I then later want do another update and install something else, I can re-set the “upstall” variable and arrow up or grab it out of history.

11:53:44 madivad@he1000:~$ upstall=jq
12:03:44 madivad@he1000:~$ sudo apt update && sudo apt install $upstall
Hit:1 xenial InRelease
Get:2 xenial-updates InRelease [92.2 kB]
Hit:3 xenial-backports InRelease
Get:4 xenial-security InRelease [92.2 kB]
Fetched 184 kB in 2s (91.0 kB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
All packages are up to date.
Reading package lists... Done
Building dependency tree
Reading state information... Done
jq is already the newest version (1.5+dfsg-1).
0 to upgrade, 0 to newly install, 0 to remove and 0 not to upgrade.
I'm a simple man, I like simplicity. And although there are probably better ways to do this, for the time being, this is how I'm getting the job done. It works well for me, but I'm open to any suggestions and/or improvements.

As I said, not the best example, but hopefully you get the idea.

SSH key pairs and getting it onto the server

cat ~/.ssh/ | ssh someuser@someserver "mkdir -p ~/.ssh && cat >>  ~/.ssh/authorized_keys"

usual assumptions:

  • change `someuser` and `someserver` as appropriate
  • usual public key file and location on the client
  • usual authorisation file location on the server

new lines in sed on mac

Let’s say I have a file:

2016-03 line 1.2016-03 line 2.2016-03 line 3.2016-03 line 4.

What I would normally execute:

sed 's/2016-03/\n2016-03/g' infile > outfile

But in OS X this resulted in output similar to:

2016-03 line1.n2016-3 line2.n2016-3 line3.

I tried on this for a bit before searching for the solution. The solution was to add /'$'\n which finally output what I was after:

sed 's/2016-03/\'$'\n2016-3/g' infile > outfile

2016-03 line 1.
2016-03 line 2.
2016-03 line 3.
2016-03 line 4.

What files is my program trying to access?

In this example I’m using hashdeep. I’m redirecting the output of two hash sets to two different files. I am doing that with the following command:

hashdeep -rj0 /path-to-drive-1 > hashes.drive1


hashdeep -rj0 /path-to-drive-2 > hashes.drive2

I have those running in their own terminal windows. I then optionally have another two windows open running a tail on them so I can monitor the files:

tail -f hashes.drive1

The hard drives are located in an external multi-bay enclosure and all hard drive LEDs are flashing away like mad. A good sign. But every now and then I’ll run an ‘ls’ to see where the files are at (checking file size) or alternatively (and usually better but more resource intensive) a line count of the hash files. Given I know how many files there should be, the line count gives a fair indication of the progress of the whole process.

wc -l*

In today’s example I was simply doing a file size comparison of the two hashes vs a known hashset of one of the drives that was a month old. The sizes should be relatively similar. I was getting results similar to:

madivad@server:~$ ls -al hashes*
-rw-rw-r-- 1 madivad madivad 330483319 Feb 11 09:26 hash.drive1.1602
-rw-rw-r-- 1 madivad madivad 341570757 Mar 23 12:09 hash.drive1.1603
-rw-rw-r-- 1 madivad madivad 243344728 Mar 23 11:18 hash.drive2.1603

The fact that drive1.1603 is larger is of no consequence, there are just more files to consider.

After running the above check for sometime, I realised that one of the files (in this case drive1.1603) had stalled for several hours. I’m not exactly sure when it seemed to stop growing, but doing a tail of the file confirmed it was stopped. The last output was an inconsequential .DS_Store file roughly 6K in size. After physically monitoring it for some time I began to get concerned about this. I could see the all 4 RAID drives getting activity, but nothing was being recorded. The 5th drive, the backup, was hashing away without a problem and the log file was growing as expected.

After some quick research I came across this stack exchange Q&A ( How do I know which file a program is trying to access? )

The first answer provided a solution that worked best with my scenario:

lsof -c hashdeep

I’d never seen this output before but very quickly I could see the important pieces of information it had dumped out. Namely:

madivad@server:~$ lsof -c hashdeep
hashdeep 2539 madivad 1w REG  252,0     243344728  5535319    /home/madivad/hash.drive1.1603
hashdeep 2539 madivad 3r REG  259,0  499418030080  113639426  /path1/largeFiles/a-very-big-image-of-500GB.img
hashdeep 2552 madivad 1w REG  252,0     341611062  5535320    /home/madivad/hash.drive2.1603
hashdeep 2552 madivad 3r REG  8,33     3152347139  126025746  /path2/misc/random.file

The ‘w’ of FD with ‘1w’ signifies the file is being written and that the file being written was hash.drive1.1603

The ‘r’ of FD with ‘3r’ signifies the file is being read for hashing purposes, and that file is a very large file that I know is around 500GB. Running the command again shows me the second file being read in had changed, yet the first had stayed the same.

Given the file is very large and will take considerable time to hash and that the hard drive LEDs are flashing, I realised all was good in the world and I could move on with the days activities.

UPDATE: after reading the man page on lsof I found a better way to monitor the continual progress of it was to run it with the -r “repeat” switch which defaults to 15 seconds, which could be updated more or less frequently by adding a numerical component:

lsof -r 5 -c hashdeep

Adding to the Favourites Sidebar

drag and drop folder to osx favourite sidebarWhen that happens, there are two other options:

  • File > Add to Sidebar
  • Keyboard shortcuts

Sometimes the File menu option is not available, but the keyboard shortcut CTRL + CMD + T is usually right to go.

You could try dragging a subfolder into place and then ESCAPEing out of it. This will usually open up the past the re-add the folder you couldn’t add a moment ago.