Skip to content

Instantly share code, notes, and snippets.

DPKG CHEATSHEET

# Download .deb file from repo
apt downloadd ${PACKAGE_NAME}

# extract control info
dpkg-deb -R ${PACKAGE_NAME} ${TO_WHERE}

# download source build
@jshen28
jshen28 / linux-userful-commands.md
Last active January 24, 2019 00:51
command cheatsheet
set autoindent shiftwidth=4 expandtab tabstop=4
execute pathogen#infect()
syntax on
filetype plugin indent on
nmap :nerdtt :NERDTreeToggle<CR>
@jshen28
jshen28 / rabbitmq.txt
Created January 7, 2019 05:28 — forked from sdieunidou/rabbitmq.txt
create admin user on rabbitmq
rabbitmqctl add_user test test
rabbitmqctl set_user_tags test administrator
rabbitmqctl set_permissions -p / test ".*" ".*" ".*"

ETHTOOL CHEATSHEET

To get a full list of available options, use man ethtool.

SHOW NIC INFO/DRIVER

ethtool -i ${NIC}

IPMITOOLS CHEATSHEET

# print info
ipmitool lan print

# restart bmc
ipmitool -I lanplus -U <USERNAME> -P <PASSWORD> -H <HOST_ADDRESS> bmc reset cold

# change boot order
# ~/.pip/pip.conf
[global]
index-url = https://pypi.douban.com/simple

BUNDLE

BUNDLE_EXEC_PATH=
BUNDLE_DIR=

cd $BUNDLE_DIR
${BUNDLE_EXEC_PATH} exec ${EXECUTABLE_FILE}

PROXY OPENSTACK REQUEST

I get a job to hide openstack behind a reverse proxy and make default ports completely invisible from users.

MAIN CONFIGURATION

Right now I am afraid openstack has some problem with a unified api gateway, so I have to modify response body if version controller is accessed by the end user. (Sadly version controller should not be used because from my point of view, it conflicts with endpoints returned)

# nginx config