Tips:Dev Tools - UW-Advanced-Robotics-Lab/lab-wiki GitHub Wiki

Table of Contents

[Last generated: Tue 28 Nov 2023 14:57:32 EST]


1. Git:

1.1 A better Git Graph:

  • Now comes free with uwarl_robot-config , via $ git_log
$ git config --global alias.lg "log --graph --pretty=tformat:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --decorate=full"

# >>>> Better than `$ git log`:
### Now, you can use:
$ git lg 
### OR, with line changes:
$ git lg -p

2. Linux:

2.1 Frequently Used:

  1. $ uname -r: OS check
  2. $ cat /prov/version_signature: identify kernel
  3. $ arp -a : Scan Local Network Devices and IPs
  4. $ tree -L 1: list hierarchy of directory in depth=1

2.2 Docker:

  • containerizing application with all dependencies without users to manually setup the environment

  • available in all OS

  • encapsulates the entire OS, so you can swap out the entire OS

  • DOC: https://docs.docker.com/engine/

2.3 Environment container comparison:

Tool Name Intro Pro Con
Docker encapsulate OS environment run the same OS on different OS platform Huge
pyenv python version manager - -
virtualenv to encapsulate python dependencies switching different python with different python packages with an ease stuck with host OS
Anaconda to maintain python virtualenv + additional sci-lib Easier to work with large packages
Vagrant to provision a machine with an OS Offer higher degree of isolation than Docker, and runs as isolated processes within the host OS Heavier, larger and longer time to build

📓 [Isolation Level]: pyenv < virtualenv <= Anaconda < Docker < Vagrant

2.4 Network:

2.4.1 File Server - Samba

2.4.1.a Add network share folder

  • Add folders to network share:
$. sudo vim /etc/samba/smb.conf

## edit with:
[sambashare]
   comment = Samba on ubuntu
   path = /home/jx/samba_share
   read only = no
   browsable = yes
   guest ok = no

[vinsanalysis]
   comment = vins analysis results
   path = /home/jx/UWARL_catkin_ws/src/vins-research-pkg/research-project/output/vins_analysis
   read only = no
   browsable = yes
   guest ok = no
  • restart service:
$ sudo systemctl restart smbd.service

2.4.1.b Set User and password

$ sudo smbpasswd -a jx

2.4.2 Network Firewalls:

  • check your network security:
$ sudo ufw status numbered  

### OUTPUT:
Status: active

     To                         Action      From
     --                         ------      ----
[ 1] 3389                       ALLOW IN    Anywhere
[ 2] 22                         ALLOW IN    Anywhere
[ 3] Samba                      ALLOW IN    Anywhere
...
  • This is important to protect your Linux Desktop from malicious attack

2.4.3 Wake-On-LAN:

  • Activate your PC to enable wake-on-lan feature
  • Use ifconfig to find your network IP at ethernet port and its assigned MAC address
  • evoke to wake from other PC: $ wakeonlan -i 192.x.x.x xx:xx:xx:xx:xx:xx

> Back To Top <

⚠️ **GitHub.com Fallback** ⚠️