mysql transcations No ratings yet.

Generally how to write transaction Begin transaction by issuing the SQL command BEGIN WORK. Issue one or more SQL commands like SELECT, INSERT, UPDATE or DELETE. Check if there is no error and everything is according to your requirement. If there is any error, then issue a ROLLBACK command, otherwise issue a COMMIT command.   how • Read More »

screen tmux cheat sheet No ratings yet.

Screen screen -d -R your_session name //split only the monitor screen ctrl-a ( release the kb ), then press: | for vsplit    —> need this step : ctrl-a, c ( to create a new window, otherwise just blank screen) ctrl-a ( release the kb ), then press: shift s:  for hsplit ctrl-a , tab • Read More »

c++ multi-set/multi-map, set/map and its unordered version No ratings yet.

container name implementation/underlying struct notes/ sample unordered_set  The value of an element is at the same time its key, that identifies it uniquely. hash table unordered_multiset much like unordered_set containers, but allowing different elements to have equivalent values. hash table Internally when an existing value is inserted, the data structure increases its count which is associated with each • Read More »

sip monitoring tools No ratings yet.

Some good monitoring tools: homer: easy to install with docker for its server and install helifpy on a  sip/client/host : nohup ./heplify -hs homer_server:9060 & grep sngrep, ngrep pcap tcpdump/wireshark   Please rate this rating

vim cheat sheet No ratings yet.

useful .vimrc set tabstop=2 set shiftwidth=2 set expandtab inoremap <S-Tab> <C-V><Tab> syntax on set t_Co=256 set colorcolumn=80 “crazy vim, do not allow copy/paste set mouse=v setlocal spell spelllang=en_us “for vert term  ( split vertical vim window) :set splitright :set splitbelow   useful .screenrc # Enable mouse scrolling and scroll bar history scrolling termcapinfo xterm* ti@:te@ • Read More »

cross compile native libwebrtc ( on x86_64 host) for arm64 No ratings yet.

Direct compile webrtc on arm64 will fail: webrtc seems does not support direct support on arm, we will get errors: … Running hooks: 18% ( 4/22) sysroot_arm64 ________ running ‘vpython src/build/linux/sysroot_scripts/ –arch=arm64’ in ‘/webrtcbuilds/out’ Installing Debian sid arm64 root image: /webrtcbuilds/out/src/build/linux/debian_sid_arm64-sysroot Downloading Running hooks: 50% (11/22) binutils ________ running ‘vpython src/third_party/binutils/’ in ‘/webrtcbuilds/out’ Host • Read More »

c++ json lib: nlohmann::json No ratings yet.

nlohmann::json is a popluar json lib. code at: document at:   sample code: #include <iostream> 2 #include <nlohmann/json.hpp> 3 4 using json = nlohmann::json; 5 6 int main() 7 { 8  // create a JSON object with different entry types 9  json j = 10  { 11  {“integer”, 1}, 12  {“floating”, 42.23}, 13  {“string”, “hello world”}, 14  • Read More »

Kubernetes Quick Start No ratings yet.

Learning curve for Kubernetes (K8s) could be steep. For most users who are already familiar with basic networking, OS/Linux,  docker container technologies etc, the difficulties , I personally think,  is most likely due to its unique concepts, sometime confusing terms. Based on my learning experience, I wrote a book: Kerbernetes Quick start, hopefully can help • Read More »