Thursday, February 20, 2020

Local repos co-development setup



Assume

  • you and your colleagues are co-developing feature that you want to share latest commits every so often without publishing to the center repo
  • or on rare case: you have work done on two clones of a same repo (on same machine or different machines)

Let's say they are:

  • ~/ws1/repo
  • ~/ws2/repo

To setup the sharing so that you can pick commit from ~/ws1/repo to ~/ws2/repo and vice versa:

1) Setting up ~/ws1/repo:
  • cd ~/ws1/repo
  • git remote add ws2 ~/ws2/repo/  // Add remote repo. This is an one time setup
  • git fetch ws2                               // Always run this to update remote repo information
  • now you can see/pick commits from remote repository:
    • git log ws2/master
    • git cherry-pick 
2) Setting up ~/ws2/repo (exact same steps)

  • cd ~/ws2/repo
  • git remote add ws1 ~/ws1/repo   // Add remote repo. This is an one time setup
  • git fetch ws1                               // Always run this to update remote repo information
  • now you can see/pick commits from remote repository:
    • git log ws1/master
    • git cherry-pick 

More possibly, over 2 repos remotely with SSH:


git remote add ws1 user@server:~/src/repo/

Extra Use cases:
* When you have multiple clones of a remote repo for some reason, and remote pull is slow, you can setup one of the local repo has a upstream and use that to pull from the remote server. But having the rest of local clone pull from this local master.

git branch --set-upstream-to ws2/my_branch

Tuesday, January 14, 2020

Selectively merge code from another branch


Assume there's a source branch that we want to pick up some code from: branchA and the target branch is branchB


  • Setup meld as difftool:
git config --global diff.tool meld 


  • Check out working branch:
git co branchB


  • Bring up the diff tool: 
git difftool -d branchA..branchB

Note:

  • co is alias for checkout
  • Environment: Linux (Ubuntu)

Tuesday, July 17, 2018

Some readings on TCP congestion control

https://linuxgazette.net/135/pfeiffer.html [GOOD one]
http://www.cs.utexas.edu/users/lam/395t/slides/Congestion%20Control%202%20talks.pdf
https://en.wikipedia.org/wiki/TCP_congestion_control

https://www.isoc.org/inet2000/cdproceedings/2d/2d_2.htm
http://www.linux-admins.net/2010/09/linux-tcp-tuning.html
https://fasterdata.es.net/host-tuning/linux/expert/
https://cromwell-intl.com/open-source/performance-tuning/tcp.html


Monday, July 16, 2018

Today I get to know about TCP TSO...


https://osqa-ask.wireshark.org/questions/24699/tcp-packet-length-was-much-greater-than-mtu



https://forum.ivorde.com/linux-tso-tcp-segmentation-offload-what-it-means-and-how-to-enable-disable-it-t19721.html

Thursday, November 09, 2017

Fixing WN823N v1 detection on ubuntu

http://www.tp-link.com/us/download/TL-WN823N_V1.html#Driver

https://ubuntuforums.org/showthread.php?t=2348667



sudo apt-get update
sudo apt-get install git linux-headers-generic build-essential dkms

git clone https://github.com/pvaret/rtl8192cu-fixes.git
sudo dkms add ./rtl8192cu-fixes
sudo dkms install 8192cu/1.10
sudo depmod -a
sudo cp ./rtl8192cu-fixes/blacklist-native-rtl8192.conf /etc/modprobe.d/

Sunday, October 22, 2017

Ostinato & packETH

Ostinato

Need traffic generator that can generate vlan traffic - trying out Ostinato

Build:

https://devguide.ostinato.org/BuildingFromSource.html

git clone https://github.com/pstavirs/ostinato.git

On Ubuntu 16.04, install deps:
sudo apt-get install qt4-dev-tools libqt4-dev

sudo apt install protobuf-compiler protobuf-c-compiler libprotobuf-dev libpcap-dev

qmake
make
sudo make install

/usr/local/bin/ostinato

Note:
- Does seems to work with wifi interface. Only can see bluetooth adaptor. Didn't investigate further.

packETH

http://packeth.sourceforge.net/packeth/Home.html

sudo apt install libgtk2.0-dev
./configure
make
sudo packETH

packETH is more straightforward, and work with wifi interface.
Build the packet and use Gen-b to send