It's just my notes, or not?

tmux - Quick Command Reference

Session

- Start a default Session (with 1 window and 1 pane)
$ tmux
- Start a Session with a custom name
$ tmux new -s <session_name>
- Detach from the current session
Ctrl-b d
- Detach a Session (can choose which Session to detach)
Ctrl-b D
- List all Session
$ tmux ls
- Resume a Session
$ tmux attach -t <session_name>
- Rename a Session
$ tmux rename-session -t <old_name> <new_name>

Window

- New Window (with 1 pane)
Ctrl-b c
- Move to the next Window
Ctrl-b n
- Move to the previous Window
Ctrl-b p
- Move to a Window by number
Ctrl-b <number>
- Rename the current Window
Ctrl-b ,
- Kill the current Window
Ctrl-b &

Pane

- New Pane on the right
Ctrl-b %
- New Pane on the bottom
Ctrl-b “
- Move to Pane
Ctrl-b <arrow key>
- Resize Pane
Ctrl-b Ctrl-<arrow key>
- Maximize Pane (toggle)
Ctrl-b z
- End the current Pane (shell exit)
Ctrl-d
  OR
$ exit
- Kill the current Pane
Ctrl-b x

Other

- List of tmux command
Ctrl-b ?
- Enter scrollback mode
Ctrl-b [
  OR
Ctrl-b PgUp
- Exit scrollback mode
q

Remotely upload sketch to Arduino Yun using command line.

  1. Compile and get the hex file

    In Arduino IDE,
     -  Sketch > Export Compiled Binary
        Wait for the compilation process to finish
     -  Sketch > Show Sketch Folder
        Let's take the one without bootloader.
     
  2. Copy [your_sketch].hex to the Yun You@PC $ scp [your_sketch].hex root@arduino.local:/tmp
  3. SSH into Yun You@PC $ ssh root@arduino.local
  4. Merge your sketch with the bootloader (for the one without bootloader) root@Arduino:~# merge-sketch-with-bootloader.lua /tmp/[your_sketch].hex
  5. Program the MCU (ATMega32u4) root@Arduino:~# run-avrdude /tmp/[your_sketch].hex Done!

Install Docker and Docker-Compose on Raspberry Pi

# Docker
curl -sSL https://get.docker.com | sh
sudo usermod -aG docker pi

# Docker-Compose
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
python get-pip.py
pip install docker-compose

[Failed] Installing OpenBTS for USRP1 on Ubuntu 16.04

# Firstly, install GNU Radio 3.4.2 for USRP1
# http://blog.puiup.net/2017/05/installing-gnu-radio-342-for-usrp1-on.html

git clone https://github.com/RangeNetworks/dev.git

cd dev

./clone.sh

export PKG_CONFIG_PATH=/usr/local/lib64/pkgconfig

./build.sh USRP1

sudo dpkg -i BUILDS/--YOUR_TIMESTAMP--/*.deb

sudo apt-get -f install

## -- 8th May 2017
## PROBLEM#1: Cannot start OpenBTS daemon
## CAUSE: Compatibility issue: OpenBTS is using "upstart" but Ubuntu uses "systemd"
## SOLUTIONS:
##     - Wait for the OpenBTS to fix this
##     - Convert upstart scripts to systemd scripts by yourself
##     - Change your ubuntu to use upstart
##     - Back to Ubuntu 14.04
##     - Run it manually. <--- This works

## -- Some time after
## PROBLEM#2: OpenBTS process keeps terminating after a few seconds.
## CAUSE: The driver problem?
## SOLUTIONS:
##    - Take time finding and hacking into the obsoleted codes/device?
##    - Throw away the USRP1 and find new equipment.

REF: https://github.com/RangeNetworks/dev/wiki
REF: http://openbts.org/w/index.php?title=USRP1

Installing GNU Radio 3.4.2 for USRP1 on Ubuntu 16.04

sudo apt-get install cc1111 libgsl-dev libaudio-dev libxt-dev libsm-dev libice-dev swig fftw3-dev pkg-config libcppunit-dev libboost-dev libboost-all-dev libusb-dev
## This is on my system, yours may need more.

wget http://gnuradio.org/releases/gnuradio/gnuradio-3.4.2.tar.gz

tar -zxvf gnuradio-3.4.2.tar.gz

cd gnuradio-3.4.2

./configure --with-boost-libdir=/usr/lib/x86_64-linux-gnu --disable-usrp2 --disable-gr-qtgui LDFLAGS="-lboost_system"

vi gnuradio-core/src/lib/filter/qa_gri_mmse_fir_interpolator_cc.cc
## At Line 96, change "intptr_t" to "long".

make

make check

sudo make install