Wednesday, June 20, 2018

Stream DeepLens video over SSH

$ export IP=192.168.0.123 # replace with your own DeepLens ip address

# Raw video output
$ ssh aws_cam@${IP} cat /opt/awscam/out/ch1_out.h264 | mplayer -demuxer x264 - 2>/dev/null

# Processed (by model) video output
$ ssh aws_cam@${IP} cat /tmp/results.mjpeg | mplayer -demuxer lavf - 2>/dev/null

Reference
https://www.youtube.com/watch?v=HozP1t3usPM


Wednesday, June 06, 2018

vim go plugin install

On MacOS

1. Make sure go in available, if not
brew install golang

2. Update vim
brew install vim

3. Install Vundle
git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim

4. Install vim-go
git clone https://github.com/fatih/vim-go.git ~/.vim/plugins/vim-go

5. Modify ~/.vimrc, add the following line:
call vundle#begin('~/.vim/plugins')
     Plugin 'fatih/vim-go'
call vundle#end()

6. Initialize vim-go
:GoInstallBinaries





On Ubuntu, using vim-plug:
1. curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
    https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim

2. git clone https://github.com/fatih/vim-go.git ~/.vim/plugged/vim-go

3. Add to ~/.vimrc
call plug#begin()
Plug 'fatih/vim-go', { 'do': ':GoInstallBinaries' }
call plug#end()

4. Done.


Reference
https://github.com/fatih/vim-go
https://github.com/fatih/vim-go-tutorial
https://github.com/fatih/vim-go-tutorial#quick-setup

git: ignore SSL certificate, set/unset http proxy

git config --global http.sslVerify false
git config --global http.postBuffer 1048576000

git config --global http.proxy http://user:pass@proxy.server.com:3128


git config --global --unset http.proxy



Workaround for "RPC failed; curl 56 GnuTLS recv error"

mkdir proj
cd proj
git init
git remote add -f origin https://github.com/user/proj
git fetch
git checkout -B master origin/master



Reference:
https://confluence.atlassian.com/bitbucketserverkb/ssl-certificate-problem-unable-to-get-local-issuer-certificate-816521128.html
https://stackoverflow.com/questions/783811/getting-git-to-work-with-a-proxy-server
https://bugs.launchpad.net/ubuntu/+source/gnutls26/+bug/1111882




apt-get with proxy

sudo vim /etc/apt/apt.conf

Add the following lines:

Acquire::http::Proxy "http://user:pass@server:port";
Acquire::https::Proxy "http://user:pass@server:port";

Reference
https://askubuntu.com/questions/257290/configue-proxy-for-apt

tmux enable mouse mode

Before tmux 2.1

set -g mode-mouse on
set -g mouse-resize-pane on
set -g mouse-select-pane on
set -g mouse-select-window on

For tmux 2.1 and later

setw -g mouse on 

Reference

https://tangledhelix.com/blog/2012/07/16/tmux-and-mouse-mode/

Monday, June 04, 2018

Install LXDE on Ubuntu 14.04

On your ubuntu:
apt-get update
apt-get install xrdp
apt-get install lxde
echo lxsession -s LXDE -e LXDE > ~/.xsession

On your windows:
mstsc.exe /v:ubuntu.example.com /f /span /admin

Reference:
http://c-nergy.be/blog/?p=5357
http://techgenix.com/configuring-windows-remote-desktop-command-line/