Skip to content

Instantly share code, notes, and snippets.

@xinzweb
xinzweb / tmux-cheatsheet.markdown
Last active December 12, 2017 19:11 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@xinzweb
xinzweb / pg_regress.md
Last active June 25, 2018 07:01
To just run one test in `pg_regress` under Greenplum

Usually, you only got one test failed, and you tried to rerun that failed test, and there are tables missing, or data didn't load right.

It's a tedious process to find all the dependencies, and I tried that to produce a known list of tests should run before you even try your repro.

This is the list of tests you need to run before your repro of failed tests based on 5.7.0 release:

@xinzweb
xinzweb / docker-build-gcloud-auth.md
Last active August 17, 2018 00:04
`docker build` paused 10 seconds before `Sending build context`

I recently experienced slow down with docker build, after I ran gcloud auth configure-docker.

The 10 seconds slow down is caused by the extra step of gcloud authentication, even though you are not using the gcr.io registry in your current build.

To solve this problem, just rename the file under ~/.docker/config.json to something else, like:

mv ~/.docker/config.json ~/.docker/config.json.gcloud
#!/usr/bin/env bash
set -x
# need to specify where to put the test file (on the target device)
if [ $# -eq 0 ] ; then
echo "usage: $0 <target file on device>"
exit 1
fi
@xinzweb
xinzweb / tmate-slave-ubuntu-1604.md
Last active January 18, 2019 12:52 — forked from mego22/tmate-slave-ubuntu-1604.md
Tmate-slave on Ubuntu 16.04

Install dependincies

apt-get install  git-core build-essential pkg-config libtool libevent-dev libncurses-dev zlib1g-dev automake libssh-dev cmake ruby

Install msgpack >= 1.2.0

git clone https://github.com/msgpack/msgpack-c.git
cd msgpack-c
cmake .
# package dependences
sudo apt install pkg-config
sudo apt install libssl-dev
# build toolchain
sudo apt-get install curl
curl https://sh.rustup.rs -sSf | sh
source $HOME/.cargo/env
rustup default nightly