Monday, 21 December 2015

A way to recover your lost Android keystore and key password

I'm pretty good with passwords - I keep a Keepass file on everything I do, and it's backed up immediately to the cloud. But something went wrong recently, and a password to a keystore and key did not get saved to my Keepass file. After some mild panic I learned that you can probably find your passwords in clear text in one of your gradle logfiles, this one to be precise:
.gradle/X.X.X/taskArtifacts/taskArtifacts.bin
Just search for the word password and if you're lucky like me you'll find the strings, separately recorded as keyPassword and storePassword. Sounds like a security hole to me, but boy it came in handy today.

Friday, 18 December 2015

Rendering transaction data in Adestra MessageFocus

I found myself doing this today, and it didn't go without some problems. I thought I'd document the outcome. Here's the data we're sending to the API: and here's the rendering logic in the email:
[*transaction.customer_first_name*] [*transaction.customer_last_name*]
[*transaction.customer_loyalty_card_number*]

[*transaction.customer_loyalty_card_balance*]

[*transaction.order_reference*]

[*transaction.order_total*]

[*transaction.order_store_address*]

[*transaction.order_collect_date*]

[*transaction.order_collect_time*]

[*transaction.till_type*]

[*transaction.address*]

[*transaction.vat_number*]

[*FOREACH item IN transaction.items*]
Name: [*item.value.Name*]
[*FOREACH subitem IN item.value*]
[*subitem.key*]:[*subitem.value*]
[*END*]
[*END*]

Friday, 4 December 2015

Target iPhone only in Cordova

Just drop this into your config.xml:

<preference name="target-device" value="handset" />