My Blog

Mostly my technical notes about things I did and issues I solved.

ionic input field with side button

By kris | Feb 24, 2018 | 0 Comments

Ionic input field with side button got answer from here https://stackoverflow.com/questions/36195858/ionic-adding-a-button-inside-a-input-field <ion-item> <ion-input type=”password” placeholder=”Password”></ion-input> <button clear item-right>Forgot</button> </ion-item>

Read More

Mac OS delete failed bootcamp partitions/volumes

By kris | Feb 20, 2018 | 0 Comments

Deleting failed Bootcamp partition So after bootcamp failed and there is 2 bootcamp partitions that you cannot delete. Here is how to document by using diskutil command to help you remerge partition back to your mac main volume. first list all your partition diskutil list and then figure out which 2 to be deleted mine…

Read More

MacOS Ionic build android Error: spawn EACCES

By kris | Dec 30, 2017 | 0 Comments

Newly installed android studio has gradle access not set to execute. ending up with Error: spawn EACCES error message. using –verbose does not show details. but change mod to add execute permission fix the issue. chmod +x /Applications/Android Studio.app/Contents/gradle/gradle-4.1/bin/gradle

Read More

Firebase rule using auth user email

By kris | Dec 30, 2017 | 0 Comments

Fire base rule using user authentication email This is to take note that in order to create rule base on auth email, this is how to access it. $(request.auth.token.email)

Read More

Docker toolbox docker-machine change proxy settings

By kris | Dec 5, 2017 | 0 Comments

Last time I posted way to set proxy into docker-machine. But as we need to change the corporate password once couple months, we need to change the proxy settings as they have password encoded in URL. We know that docker machine configuration is to set it into /var/lib/boot2docker/profile file. but changing the file on the…

Read More

Firebase Firestore add item issue

By kris | Nov 30, 2017 | 1 Comment

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…

Read More

decode websphere {xor} in python

By kris | Nov 23, 2017 | 0 Comments

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  

Read More

Thoughts on Production Key and Passphrase

By kris | Nov 21, 2017 | 0 Comments

using protected keys in production does not actually increase the security much, if at all. This is because, once activated, private keys are kept unprotected in program memory; an attacker who can get to the server can get the keys from there with just a little more effort. Thus, passphrases should be viewed only as…

Read More

Using docker repo for openshift

By kris | Nov 17, 2017 | 0 Comments

this is how you reference docker image in openshift pointing to docker repo. –images=docker.io/your/image:tag  

Read More

ionic cannot focus on input field on iOS emulator

By kris | Nov 10, 2017 | 0 Comments

ionic has tons of issue of compatibility issue, just ran into another one where running ionic app in ios emulator, the input field cannot be focused.   the solution is to simulator -> “Hardware” -> “Keyboard” -> “Toggle software keyboard”

Read More