Favorite CLI stuff

OpenShift

Query a repo for all images and their tags.

curl -s -X GET http://localhost:5000/v2/_catalog | jq ".repositories[]" | xargs -I{} curl -s -X GET http://localhost:5000/v2/{}/tags/list

Sample output:

{"name":"openshift3/container-engine","tags":["v3.7.23"]} 
{"name":"openshift3/efs-provisioner","tags":["v3.7.23"]} 
{"name":"openshift3/logging-auth-proxy","tags":["v3.7"]} 
{"name":"openshift3/logging-curator","tags":["v3.7"]} 
{"name":"openshift3/ose","tags":["v3.7.23","v3.7"]}

Run mosh-server on Privileged Port

setcap 'cap_net_bind_service=+ep' /usr/bin/mosh-server

Powerline and Centos 7

yum -y install epel-release
yum -y install python-pip vim-enhanced git wget
pip install powerline-status

bash

~/.bashrc – adjust powerline path as necessary or /etc/profile.d/powerline.sh

# I like vi keybindings.  You may not.
set -o vi
# if powerline is installed, then use it
command -v powerline-daemon &>/dev/null

powerline-daemon -q
POWERLINE_BASH_CONTINUATION=1
POWERLINE_BASH_SELECT=1
. /usr/lib/python2.7/site-packages/powerline/bindings/bash/powerline.sh
bash/powerline.sh

Adding git branch info to bash powerline using the “default_leftonly” theme

https://leifmadsen.wordpress.com/2015/09/09/configuring-powerline-to-show-working-git-branch/

Continue reading “Favorite CLI stuff”