Playing with xbar: Showing WordPress Site Page Views In Menu Bar

Today while reading a tech newsletter I discovered xbar. xbar[1] lets you put output from any script/program in your macOS menu bar. Xbar is built using Wails. Wails[2] allows you to build desktop apps using Golang and Web technologies.

Xbar has a plugin based architecture. There are hundreds of pre-built plugins that help you view information about AWS, cryptocurrency, weather, date & time, and many others.

Continue reading “Playing with xbar: Showing WordPress Site Page Views In Menu Bar”

Podman for Java Developers: The Missing Tutorial

I have been using Docker since late 2013 and for me and many others Docker has revolutionised the way we build, package, and deploy software. As a community we are grateful to Docker and its creators. Docker is one of the first tools that I install on my dev machine. It used to be always running on my MacBook and anytime I wanted to try a new technology I preferred to install it using Docker. Just do a docker run <tech> and you are good to go. But, this has changed in the last couple of years. Docker for Mac is still installed but I no longer keep it running. The main reason for that has been the amount of resources it consumes, distracting fan noise, and MacBook becoming too hot. There are many issues filed in the Docker for Mac issue tracker on Github where developers have shared similar experience. Still, I kept using it as there was no good alternative available.

A couple of weeks back I learnt that Docker has changed its monetization strategy. Docker Desktop (Docker for Mac and Docker for Windows) will soon require subscription. From the Docker blog published on 31st August 2021 I quote:

  • Docker Desktop remains free for small businesses (fewer than 250 employees AND less than $10 million in annual revenue), personal use, education, and non-commercial open source projects.
  • It requires a paid subscription (Pro, Team or Business), starting at $5 per user per month, for professional use in larger businesses. You may directly purchase here, or share this post and our solution brief with your manager.
  • While the effective date of these terms is August 31, 2021, there is a grace period until January 31, 2022 for those that require a paid subscription to use Docker Desktop.
Continue reading “Podman for Java Developers: The Missing Tutorial”

Playing with htmlq, awk, and sed

Last week I discovered htmlq, a CLI tool to extract content from HTML. It is similar to jq, a very powerful and popular command-line JSON processor.

The best way to learn a tool is to use it for something useful. In this short post, I am showing you how I used htmlq to extract content from my Github profile https://github.com/shekhargulati?tab=repositories.

Finding name of all the repositories on the first page

curl --silent https://github.com/shekhargulati\?tab\=repositories \
| htmlq 'a[itemprop="name codeRepository"]' \
| htmlq --text --ignore-whitespace \
| awk '{$1=$1};1' \
| sed '/^$/d'

It lists the last updated 30 repositories.

useful-microservices-reading-list
python-flask-docker-hello-world
textract
cookiecutter-spring-boot-ms-template
useful-twitter-threads
software-architecture-document-template
awesome-multitenancy
flask-login-example
project-wiki-template
okrapp
ziglings
timeflake-java
shekhargulati
30-seconds-of-java
99-problems
useful-tech-radars
first-git-commit
spring-boot-maven-angular-starter
boot-angular-pagination-example-app
covid-19-resources
must-read-resources-for-java-developers
strman-java
funwithlambdas
spring-boot-failure-analyzer-example
java8-the-missing-tutorial
image-resolver
fs-101-homework
copy-as-plain-text-chrome-extension
opentracing-microservices-example
k8s-workshop
Continue reading “Playing with htmlq, awk, and sed”