How to generate an upload key for Google App Signing?

I just went through this exhausting process. I’m using React Native so I never even use Android Studio unless I need to launch a virtual device. I’m documenting this for myself and anyone else that has been traumatized by this experience. This is explicitly for the ‘Upload Key’ option. Google then swaps it out on … Read more

Making all numbers negative

A trivial $num = $num <= 0 ? $num : -$num ; or, the better solution, IMHO: $num = -1 * abs($num) As @VegardLarsen has posted, the explicit multiplication can be avoided for shortness but I prefer readability over shortness I suggest to avoid if/else (or equivalent ternary operator) especially if you have to manipulate … Read more

Git sign off previous commits?

To signoff the previous commit, use amend option: git commit –amend –signoff Since Git 2.13, you can use the –signoff rebase option to specify range of commits to signoff (credits to @sschuberth). Example to signoff last two commits: git rebase –signoff HEAD~2 To signoff multiple commits using Git prior to version 2.13, use filter-branch and … Read more

Signing a Windows EXE file

You can try using Microsoft’s Sign Tool You download it as part of the Windows SDK for Windows Server 2008 and .NET 3.5. Once downloaded you can use it from the command line like so: signtool sign /a MyFile.exe This signs a single executable, using the “best certificate” available. (If you have no certificate, it … Read more