I use RoboMongo extensively for all my Mongo development work / debugging. I however sorely needed a way to export JSON from it. A Stack Over Flow link came up in a Google search and I was able to export JSON for my use. Basically you need to execute this command which uses “printjsononeline” function provided by Mongo to give you one line JSON for each row in the collection:
I needed to design a UI using JavaFX. I use SceneBuilder for building my UI. I found this invaluable link for using AnchorPanes concept to make it work inside TabPanels. It really cleared my concepts in a minute and I had a working tab based UI shortly.
I recently started exploring python and immediately ran into the following issue:
$ pip install requests
-bash: pip: command not found
A quick google search yielded this result. So basically on MacOS you have Python preinstalled along with easy_install command. So the following command installs pip:
$ sudo easy_install pip
Searching for pip
Best match: pip 9.0.1
Processing dependencies for pip
Finished processing dependencies for pip
A quick and handy solution indeed!
Adding docker containerization support in a working Spring Boot application is surprisingly easy.
Step 1: Add the docker maven plugin to your pom file.
Step 2: Build the application as well as the docker image
mvn clean package install dockerfile:build
Step 3: I have a local docker registry setup in my Lan so I prefer to push this image to my network registry manually (this can be automated as well however).
docker tag my-app:latest my_network_registry_host:5000/my-app
Step 4: Now we can bootup this docker image anywhere in the network.
docker run \
--link <any database link> \
-e <Environment variable 1> \
-e <Environment variable 2> \
-p 8080:8080 \
--name my-app \
Step 5: Checkout the application URL @ http://localhost:8080. Tail the log if you want to
docker logs --follow simply-hr
Found a good article which enabled me to install python 2.7.3 inside a folder.
Install python to separate directory on linux in 5 easy steps