Jason Meridth's Blog Learn, Converse, Share

Cleanup Docker

Cleanup Docker

I keep having friends who have experienced the no space left on device when trying to build images.

I have aliases for most of my container/image/volume cleanup:

lias dka='dkc;dki;dkv'
alias dkc='docker ps -aq | xargs docker rm -f'
alias dki='docker images -aq | xargs docker rmi -f'
alias dkv='docker volume ls -qf dangling=true | xargs docker volume rm'

I use dka all the time.

There is also the docker system prune -a command that works.

I’ve also had to unmount my local aufs volume on my ubuntu laptop via:

sudo umount -l /var/lib/docker/aufs && sudo rm -rf /var/lib/docker/aufs

and all things are cleaned up. Hope this helps someone else.

Cheers.

OnePlus 5

OnePlus 5

I’ve had a Nexus 6 for the last 2 years and was finally due for a phone upgrade. I went through a pretty good fiasco with Google store trying to purchase a Google Pixel XL earlier this year so I decided to wait for the One Plus 5 (release late June). I ordered it the first hour it was announced.

Features that I’m loving:

  • 8 GB RAM
  • 128 GB hard drive
  • dash charge
  • USB C
  • OxygenOS (Android fork)
  • headphone jack
  • fingerprint authentication
  • dual camera (allows for portrait mode) 16 MP
  • front camera 16 MP
  • Dual SIM support

More detailed specs can be found here

Features I’m adjusting to:

  • no Google Phone app install allowed
  • no Google Contacts app install allowed

I’ll adjust to those over time.

I did entertain the iPhone 7 for a bit also but am not a fan of iTunes. The iPhone integration with Google apps has gotten much better since the last time I looked though.

Cheers.

Mapping Caps Lock to Esc Is Native to OSX Now

I have been using Seil for a few years now on OSX to map Caps Lock to Esc. I use Vim for my development and letting my left pinky tap the Caps Lock key instead of Esc allows me to keep my hands on the home row and move much quicker. I also can’t remember the last time I actually needed the Caps Lock key. Well as of 10.12.1 (macOS Sierra Update) you can do this mapping in System Preferences.

Thank you to my co-worker Dedi for letting me know about this.

Go to System Preferences from the Apple menu:

system preferences

Go to keyboard: Keyboard

Go to “Modifier Keys” button on bottom right: Modifier Keys Button

Change Caps Lock Key to Escape: Change Caps Lock Key to Esc

Details HTML Section In Github Issues and Gists

I recently became aware of using the <details></details> and <summary>...</summary> tags in Github issues and Gists.

Here is an example.

I will definitely be using this more when posting big logs or stack traces.

Kudos:

  • Laura Frank for showing me this feature
  • Keith Dahlby for letting me know it doesn’t currently work in Firefox
  • Matt Hinze for showing me this gist where I learned of <summary>...</summary>
  • Eric Clemmons for the awesome gist that does a great job explaining the feature

Stop and Remove All Docker Containers

Command remove all docker containers:

docker stop '$(docker ps -a -q)' && docker rm '$(docker ps -a -q)'

docker ps -a -q lists all container IDs