Skype update breaks phone calls on MacOS

So the latest Skype update (Skype version 8.64.0.67) changes the default calling application on MacOS to Skype instead of FaceTime. This breaks making phone calls using your iPhone from MacOS. To revert this change, launch FaceTime, goto Preferences and change the default calling application back to FaceTime.

FaceTime preferences

It is bad enough that Skype keeps getting messed up by Microsoft without an identity and idiotic experimental UX on a regular basis, hijacking the default settings on an operating system without user content takes the cake.

The Chaos in Chennai’s Supply Chain

Madras Heritage and Carnatic Music

We are opening up is the cry that is doing the rounds in the city. Temples and other religious establishments, restaurants, offices, factories and hairdressing saloons are all opening up after the lockdown. The number of COVID afflicted patients is also going up but it is now more or less agreed that living with the prevalence of this virus may be the new way of life. All we need to do at present is to maintain physical distance from others, wash our hands frequently and wear masks. But while people may be ready to resume their various occupations it is quite clear that it may be several months before business returns to normal.

Leave aside the demand side of things – that is for others to worry about. Most factories are at present facing supply-side shortages. There is firstly the shortage of manpower. Most companies in view of the continuing…

View original post 481 more words

Using custom Gitlab with Meltano

For those who haven’t used Meltano before, this is how I got it work with self hosted Gitlab (hosted by your organisation or yourself).

To install Meltano – follow the instructions that can be found at https://meltano.com. The better method to install Meltano is via virtualenv on Python. If you are stuck with Windows, perhaps Docker is an option. Note that Meltano has pivoted focus to improve their open source offering so things are not that great in the UI world as of version 13.6.1. The command line is the recommended tool.

meltano add transformer dbt
meltano add extractor --include-related tap-gitlab
meltano add loader target-postgres
meltano config tap-gitlab set api_url "<<your customer server base url>>"

After doing that, you need to edit the .env file in your project directory and set the following parameters. Note that the values depend on your environment, these are merely placeholders.

export PG_ADDRESS="localhost"
export PG_USERNAME="postgres"
export PG_PORT="5432"
export PG_PASSWORD="postgres"
export PG_DATABASE="meltano"
export GITLAB_API_TOKEN="<<your Gitlab API access token>>"
export GITLAB_API_GROUPS="<<space separated list of groups>>"
export GITLAB_API_PROJECTS=""
export GITLAB_API_START_DATE="2019-01-01T00:00:00Z"

Next, edit the meltano.yml file and add the following to the vars section of transforms for tap-gitlab.

entry_table: "{{ env_var('PG_SCHEMA') }}.entry"
generationmix_table: "{{ env_var('PG_SCHEMA') }}.generationmix"
region_table: "{{ env_var('PG_SCHEMA') }}.region"

Once you are done with these settings, execute

meltano elt tap-gitlab target-postgres --transform run

After that runs successfully, you can run

meltano ui

and browse the reports at http://localhost:5000

On Oracle, Java 11 & macOS 10.14

So the current news of the day is that Oracle has halted free commercial use of Oracle Java.  They provide OpenJDK that can be used for commercial purposes without a fee, but with little support.   This blog is the most clear write up on the subject.

Note, if you don’t understand the implications of doing the following, don’t try.

Once we declare Oracle to be evil, time to purge macOS of all evil. First, get rid of all JDKs.

sudo rm -rf /Library/Java/JavaVirtualMachines/jdk*.jdk

Remove Plugins

sudo rm -rf /Library/PreferencePanes/JavaControlPanel.prefPane
sudo rm -rf /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin
sudo rm -rf /Library/LaunchAgents/com.oracle.java.Java-Updater.plist
sudo rm -rf /Library/PrivilegedHelperTools/com.oracle.java.JavaUpdateHelper
sudo rm -rf /Library/LaunchDaemons/com.oracle.java.Helper-Tool.plist
sudo rm -rf /Library/Preferences/com.oracle.java.Helper-Tool.plist

Thanks to this StackOverflow post for the steps above. 

Next download AdoptOpenJDK for macOS.  I chose JDK11 with Eclipse Open9 JVM instead of Hotspot.  If we want to purge, go all the way…

Install the JDK in a reasonably isolated location.  If you use HomeBrew then choose /opt.  If you use MacPorts, then choose /usr/local.  This will avoid confusing the package manager.  Add the PATH modification to your shell (I hope that people have moved from bash to zsh by now).  Also, set the JAVA_HOME environment variable.   This will help tools like maven work. 

export JAVA_HOME=/opt/jdk-11.0.1+13/Contents/Home/

Now comes the fun part of deprecated J2EE classes, etc. for which you now need to have external dependencies in your project that satisfy these.  Refer to this StackOverflow post to get started.

mongodump with a conditional date range

If you are using mongodump and want to use conditions to get a partial data export, there are some gotchas when it comes to date.

A query like

{receivedOn : { $gte : ISODate("2018-04-05 10:44:00.344Z") } }

has to morph into

--query='{receivedOn : { $gte : { $date : "2018-04-05T10:44:00.344Z"} } }'

This is in accordance with the extended JSON format of MongoDB.

 

Moving Unicode text between Windows and Linux/MacOS

If a text file or Java file has Unicode characters like ¥ or £ and you move it between operating systems, you are likely to encounter a parser error in Linux / MacOS cribbing about invalid character in UTF-8 file.   This can be fixed by using iconv on Linux / MacOS as simple as below.


for i in `find src -name *.java`; do tmp=mktemp; iconv -f windows-1252 -t utf-8 $i > $tmp; mv $tmp $i; done

 

Oil spill on beaches

Took a trip down the coast in the Konkan region.  I had been there several years ago.  Drove down to Diveagar, Kondivli, Harihareshwar and Velas beaches.   Other than the Kondivli beach, the other beaches are still not fully recovered from the oil spill of 2010-11.   In fact I had to scrub our feet with soap to get rid of the muck that stuck to it at Diveagar.

This beach used to be have white sand.  Closer examination shows the muck due to the oil pushed ashore from the sea.

Doing some digging I found the oil spill in the Arabian sea as below.  The numbers are estimates of minimum and maximum metric tonnes.

Mumbai oil spill / MV MSC Chitra and MV Khalijia 3  India, Mumbai, Arabian Sea 7 August 2010 – 9 August 2010 400 800 [75][76][77]
Mumbai-Uran pipeline spill  India, Mumbai, Arabian Sea 21 January 2011 40 55 [72][73]

Velas beach is an isolated beach and a turtle sanctuary and not easy to reach.  I was hoping for a pristine experience and I found more oil damage.

IMG_20170813_161221

The beach was not as bad as Diveagar, but still sticky gooey stuff on the ground.

What to do?

There are multiple methods available for cleaning up oil on beaches.  Here is a snippet from NOAA.

responding-to-oil-spills-on-shore-infographic_noaa_720

The future is what the locals make out of it and support is required from the government agencies.

Tax savings on Mahindra e2oplus

Just to highlight the financial benefits of booking a pollution free electric car. I assume you are filing your own tax returns and you are able to claim depreciation.

As per the NOTIFICATION NO. 67/2005 DATED 28-2-2005 (attached – see page 6 & 7), you can claim 80% depreciation for pure EVs for eight years. See Notification No 67_Depre Rates

To illustrate this saving, lets assume you are spending 7.4 lacs ex-showroom on a Mahindra E2OPlus P6.

Year 1:You can claim 7.4 lacs *.8 = 5.92 lacs depreciation. If your income tax slab is at 30%, that is a saving of ₹1,77,600 on your income taxes.
Year 2: For year two, the residual value is 7.4 – 5.92 = 1.48 lacs. Depreciation works out to * 0.8 = 1.184lacs. With the same tax slab above that works out to ₹35,520 tax saving.

Combine this with year-end stock clearance discounts and you can save a good sum.