Sound Shock Wave Approaching

Ok, it’s not the newest of news, but I only just saw this for the first time this morning. It appears to me the eruption cloud itself is even faster than sound as you can see the shock wave overtake it early in the eruption as the cloud rises.

Easy maths challenge for the partners: How far away the eruption site was the videographer? (you can use the YoutTube time scale as reference).

“Rihanna couldn’t sing to save her life”

The artist reportedly to be worth more than US$100M by 2016 (#1) seems to not have a fan in Ashley (of Pittsburgh, Pa). For Ashley seems to think that Rihanna can’t sing when she posted to songfacts.com. (#2)

For an artist that has literally taken herself from the edges of bankruptcy due to gross financial mismanagement, to now have an estimated net worth of more than a cool US$100M by 2016; I’d say she can sing to save her life, and she has done exactly this, and done it on a grand scale.

To Rihanna: Well done.

To Ashley: I think it’s time to search for a new idiom that better describes your thoughts on the subject. This one just isn’t it.

Image Source: https://www.flickr.com/photos/dodnewsfeatures/15207242834/in/photostream/
original has been cropped and is released under CCv2.0

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)

Terms & Conditions: REGISTRATION RENEWAL

  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
Password:
Last login: Mon Apr 25 18:23:18 2016
minixbmc:~ madivad$ exit
logout
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/id_rsa.pub | ssh madivad@$remote "mkdir -p ~/.ssh && cat >> ~/.ssh/authorized_keys"
  502  remote=minixbmc
-- 11:03:34 -- MBP:~ madivad$ !440
cat ~/.ssh/id_rsa.pub | ssh madivad@$remote "mkdir -p ~/.ssh && cat >> ~/.ssh/authorized_keys"
Password:
-- 11:03:40 -- MBP:~ madivad$ ssh minixbmc
Last login: Tue Apr 26 11:03:12 2016 from mbp.fritz.box
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 http://au.archive.ubuntu.com/ubuntu xenial InRelease
Get:2 http://au.archive.ubuntu.com/ubuntu xenial-updates InRelease [92.2 kB]
Hit:3 http://au.archive.ubuntu.com/ubuntu xenial-backports InRelease
Get:4 http://security.ubuntu.com/ubuntu 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 http://au.archive.ubuntu.com/ubuntu xenial InRelease
Get:2 http://au.archive.ubuntu.com/ubuntu xenial-updates InRelease [92.2 kB]
Hit:3 http://au.archive.ubuntu.com/ubuntu xenial-backports InRelease
Get:4 http://security.ubuntu.com/ubuntu 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.

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.