Firebase Firestore add item issue

When you construct a custom type and trying to add to firestore. with the following text book code: constructor(private afs: AngularFirestore) { this.itemsCollection = afs.collection<Item>(‘items’); this.items = this.itemsCollection.valueChanges(); } add(item: Item){ this.itemsCollection.add(item); } There will be an error: Exception caught: (FirebaseError) : Function CollectionReference.add() requires its first argument to be of type object, but it…

decode websphere {xor} in python

import base64 #Decode xored = ‘KD4sPjsyNjE=’ plain = ”.join([chr(ord(c)^ord(‘_’)) for c in base64.b64decode(xored)]) #Encode enocoded = base64.b64encode(”.join([chr(ord(c)^ord(‘_’)) for c in plain])) ref: https://idmdepot.com/How_To/IBM_WebSphere_Application_Server_How_To.html  

ionic cordova plugin and platform conflict

The issue article can be found here: Issue 12849 Basically it is one of the plugin supplying some class file which is included in the latest cordova platform libraries, therefore triggered duplicate error: so basically the latest cordova platform 4.5 or higher has conflict with the cordovar plugin: cordova-plugin-console removing plugin solve the issue.

Docker toolbox behind proxy

This article is for Docker Toolbox only. So when running docker toolbox, docker host boot2docker image running in VM on Virtual Box. When using docker toolbox, you will need to edit the start.sh BEFORE you start the docker command line prompt: USE %5C instead of “\” export HTTP_PROXY=”http://DOMAIN%5Cusername:password@proxy.proxydomain.com:8080″ export HTTPS_PROXY=”http://DOMAIN%5Cusername:password@proxy.proxydomain.com:8080″ and then you can start the docker…

Docker DNS in-net resolution

addition note to the below comment that the default bridge network does support the DNS resolution. It confused me because the first few container was ran on a different configuration therefore cannot resolve each other. But when using docker compose, the containers are launched into default bridge network therefore they are able to talk to…