I created a Node.js CLI for exporting users from AWS Cognito User Pools, because AWS did not have any method of exporting/backing up the users.
I have migrated my blog from WordPress to hexo, but the old URLs need to be permanently redirected.
I’m using NGINX as my web server, so I set up some rules for redirecting the old posts to the new URLs. It’s a bit tricky because WordPress used query string param for identifying the page, but it can be sorted out using
if and the NGINX
$arg_ variable. In order to generate these rules, I wrote a simple node script that runs through the exported Markdown files from WordPress. Markdown files were exported using Jekyll Exporter plugin.)
Then insert output from the script to the nginx server block of the old blog:
Now that all pages have been redirected 301 to their new paths, a simple comment export from WordPress and import to Disqus was automatically able to crawl the old URL 301 redirects and update the URL of the Disqus comments. (Using the crawl migration tool in Disqus admin.)
I had trouble finding a iCalendar parser that lets me get the actual events as shown in my google calendar. This means automatically handling EXDATE (excluded recursive occurrences), RRULE and recurring events overridden by RECURRENCE-ID. Also timezones need to be supported.
So I made a library that builds on ical.js.
The VIPPS app is using API SSL certificate pinning to prevent MITM attacks, and the pinned certificate(s) is stored in the APK itself, so it can easily be replaced by our own generated Charles certificate. This allows sniffing the data going from the app to VIPPS servers.
First download the APK from somewhere (google it)
apktool d no.dnb.vipps-1.6.5.apk
Export Charles MITM SSL certificate by going to
Help -> SSL Proxying -> Save Charles Root Certificate
Inject Charles certificate into app
cp charles-ssl-proxying-certificate.cer no.dnb.vipps-1.6.5.apk.out/res/raw/prod_priority_1.cer
Put APK back together
apktool b no.dnb.vipps-1.6.5.apk.out -o vipps-modified.apk
Generate debug keystore for signing the new app
echo y | keytool -genkey -v -keystore debug.keystore -storepass android -alias androiddebugkey -keypass android -keyalg RSA -keysize 2048 -validity 10000 -dname "cn=Mark Jones, ou=JavaSoft, o=Sun, c=US"
Sign app with keystore
apksigner sign --ks debug.keystore --out vipps-modified-signed.apk vipps-modified.apk
apksigner verify vipps-modified-signed.apk
Install new APK to device
adb install vipps-modified-signed.apk
Now just start Charles with SSL proxying enabled and set Charles (your computer’s IP) as the proxy under WIFI settings on the Android device.
brew install dex2jar
d2j-dex2jar -f -o vipps.jar no.dnb.vipps-1.6.5.apk
Use one of the following GUI tools for decompiling and looking at the code:
None of them are perfect, and some code seems to fail decompiling in both.
adminUpdateUserAttributes to change email address of a user in Cognito User Pools, the attribute
email_verified will be set to false, and an email will be sent out to the user with a verification code.
If you want to disable this logic and prevent the email from being sent out, include
email_verified=true in the update attributes request, like so:
I needed a tool for quickly trimming recorded videos, so I built my first Electron app, check it out:
It is a cross platform simple video editor for lossless trimming / cutting of videos using ffmpeg and Electron. Great for rough processing of large video files taken from a video camera, drone, etc. Lets you quickly get rid of the useless parts. It doesn’t do any decoding / encoding and is therefore very fast and has no quality loss. Also allows for taking JPEG snapshots of the video at the selected time.
Quick script for extracting gps data from the
Tracker GPS app
First export data from app
com.eofster.tracker using something like iPhone Backup Extractor (http://supercrazyawesome.com/)
I created a Node.js CLI for exporting & importing schema and data from DynamoDB tables. I didn’t find any other node tools for dumping table schema (structure, indexes etc), they all just dump data.