Favorite CLI stuff


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:


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


~/.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
. /usr/lib/python2.7/site-packages/powerline/bindings/bash/powerline.sh

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



cat /usr/share/doc/tmux-1.8/examples/vim-keys.conf >> ~/.tmux.conf


source "/usr/lib/python2.7/site-packages/powerline/bindings/tmux/powerline.conf"
set -g default-terminal "screen-256color"



set laststatus=2 " Always display the statusline in all windows
set showtabline=2 " Always display the tabline, even if there is only one tab
set noshowmode " Hide the default mode text (e.g. -- INSERT -- below the statusline)

python from powerline.vim import setup as powerline_setup
python powerline_setup()
python del powerline_setup


MobaXTerm Hack Font for powerline


git credential helper for CLI

git config --global user.name
git config --global user.email
git config --global credential.helper cache 
git config --global credential.helper 'cache --timeout=3600'

git push remote branches with different names

git push origin local-name:remote-name


IPMI stuff

Do I have a /dev/ipmi* ?

# ls /dev/ipmi*

If not, find the address and load the kernel module.

# dmesg | grep -i bmc
# [ 14.920887] ipmi_si ipmi_si.0: Found new BMC (man_id: 0x0002a2, prod_id: 0x0100, dev_id: 0x20)

# cat /etc/modprobe.d/ipmi_si.conf
options ipmi_si type=kcs ports=0xca8 regspacings=4
# modprobe -a

Install the packages:

# yum -y install OpenIPMI ipmitool

Setup the LAN interfaces:

# ipmitool lan set 1 ipsrc static
# ipmitool lan set 1 ipaddr
Setting LAN IP Address to
# ipmitool lan set 1 netmask
Setting LAN Subnet Mask to
# ipmitool lan set 1 defgw ipaddr
Setting LAN Default Gateway IP to
# ip a
# ipmitool lan set 1 defgw macaddr 00:0e:0c:aa:8e:13
Setting LAN Default Gateway MAC to 00:0e:0c:aa:8e:13
# ipmitool lan set 1 arp respond on
Enabling BMC-generated ARP responses

Setup users:

# ipmitool lan set 1 auth ADMIN MD5ee
# ipmitool lan set 1 access on
# ipmitool lan print 1
# ipmitool user set name 2 admin
# ipmitool user set password 2
# ipmitool channel setaccess 1 2 link=on ipmi=on callin=on privilege=4
# ipmitool user enable 2
# ipmitool channel

# ipmitool -H -U admin -Ppassword chassis status
# ipmitool sdr
# ipmitool lan print

Digital Rebar:

BMC range must be added to the docker bridge from the local workstation: 

# sudo ip addr add dev docker0

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s