Retrieve OAuth 2.0 authorization code using JavaFX WebView

This post documents a snippet of code that can be added to Browser class in JavaFX WebView sample, to extract OAuth 2.0 authorization code.

Assuming you’ve configured WebView’s WebEngine to load the authorization URL, the authorization service will redirect you to the redirect_uri specified in the authorization URL, after a user logs in successfully. It will pass along the code parameter, that can be extracted as follows

JSON syntax highlighting in ScintillaNET

I am studying the excellent ScintillaNET code editing component, to enable basic JSON editing in a .NET application.

Inspired by the C# code highlighting example, here’s the code snippet to enable basic JSON syntax highlighting


Run Buildroot in a Docker Container

This post explores how you can run Buildroot in a Docker container. Follow the getting started to install Docker. I prefer using Docker with the PowerShell prompt on Windows 10.


To download and run the ubuntu image in a new container

docker run -it ubuntu bash

From another command prompt, run the following to find container id

docker ps -l

Use the -a option to see all containers

docker ps -a

Type exit to exit bash shell and stop container.

To return to container created earlier

docker start -ai container_id

Update apt-get package cache so that you can search and install additional packages

apt-get update

You should now be able to search

apt-cache search wget

And install your favorite tools

apt-get install wget

Obtain Buildroot


Untar Buildroot

tar xvzf buildroot-2016.11.2.tar.gz

Install dependencies required to run Buildroot

apt-get install patch cpio python unzip rsync bc bzip2 ncurses-dev git g++

Go ahead and build your Linux system.