export TZ=Asia/Tokyo # to set timezone for single terminal [Click]
#1. resolving the conflict in bit bucket pull request
git checkout commit-id
eg:
$git branch -a
* (HEAD detached from eb9e6ce)
master
test
remotes/origin/HEAD -> origin/master
remotes/origin/master
remotes/origin/test
#2. merge the changes from master to the detached HEAD,so both changes will be there if conflict
git merge remotes/origin/master
HEAD>>>>
<<<<<<
#3. resolve the conflit and commit it ....
git add files
git commit -m "conflict resolved" # status shows (HEAD -> test)
#4. Pushing the commit to the remote and switch to the target branch and pull
git push origin HEAD:refs/heads/test
git checkout <branch-name>
git pull #status shows conflict fixed (HEAD -> test, origin/test)
#5. In bit bucket the master changes will be sync to the test branch

RX_queue_number = hash('192.168.254.30', '192.168.254.1', 65400, 4321) % number_of_queues
ethtool. On our setup it is:receiver$ ethtool -n eth2 rx-flow-hash udp4
UDP over IPV4 flows use these fields for computing Hash flow key:
IP SA
IP DA
RX_queue_number = hash('192.168.254.30', '192.168.254.1') % number_of_queues
ethtool we can select the tuple (src IP, dst IP, src port, dst port) for hashing:receiver$ ethtool -N eth2 rx-flow-hash udp4 sdfn
Cannot change RX network flow hashing options: Operation not supported
send syscall, it wouldn't be efficient. Context switches to the kernel have a cost and it is be better to avoid it. Fortunately a handy syscall was recently added to Linux: sendmmsg. It allows us to send many packets in one go.SO_REUSEPORT each of the processes will have a separate socket descriptor. Therefore each will own a dedicated UDP receive buffer. This avoids the contention issues previously encountered:receiver$ taskset -c 1,2,3,4 ./udpreceiver1 0.0.0.0:4321 4 1
1.114M pps 34.007MiB / 285.271Mb
1.147M pps 34.990MiB / 293.518Mb
1.126M pps 34.374MiB / 288.354Mb

SO_REUSEPORT layer.ethtool -S [interface]tc qdisc show dev [interface]tc command to manipulate the available multiqueue parameters. Without knowing your intentions, it's difficult to give a specific answer, but this information should get you pointed in the right direction./proc/net/softnet_stat file with the softnet.sh script:Basics:
========
To add files to be committed
git addTo commit a change in the local tree. To be done after the git add.
git commit -m "comment about the changes" To push the changes or checkin the changes to main branch
git push To discard all changes done in a branch locally git stash save --keep-index git stash drop
To create a new branch
git checkout -b myBranch
To create a patch from the local branch Before this check out a new branch, do all changes in the branch, verify it. And then commit those changes. Do not push the changes to master. git format-patch master --stdout > myPatch.patch git resetupdates the index for that path so that it matches HEAD (the current commit). It doesn't touch the working tree git rm --cached -r to remove a directory which was added. GT Diff:
========== git diff HEAD@{1} The @{1} means "the previous position of the ref I've specified", so that evaluates to what you had checked out previously - just before the pull. git diff HEAD@{1} filename This is a general thing - if you want to know about the state of a file in a given commit, you specify the commit and the file, not an ID/hash specific to the file. git diff --cached --name-only It lists the filenames in the staging area that will be committed to git. Can be used after all the files to be committed are added thru 'git add' to verify only intended files are being commited git difftool --cached the diff of files that are about to be committed against the head will be showed in vimdiff one by one. git difftool the diff of files in the two commits will be shown in vimdiff one by one. git log --pretty=oneline compact display of git log
git diff --name-only for changes relative to indexgit diff --name-only --staged for ... well staged chages :)git diff --name-only HEAD got bothgit status --porcelain|awk '{if($1=="M") {print "scp " $2 " account_name@server_ip:~/my_codebase/$(dirname " $2 ")/;"} }'|sh
if has("autocmd")
" When editing a file, always jump to the last known cursor position.
" Don't do it when the position is invalid or when inside an event handler
" (happens when dropping a file on gvim).
" Also don't do it when the mark is in the first line, that is the default
" position when opening a file.
autocmd BufReadPost *
\ if line("'\"") > 1 && line("'\"") <= line("$") |
\ exe "normal! g`\"" |
\ endif
endif
#include <stdio.h>
#include <string.h>
char *ap1="char *ap1";
static char *ap2="static char *ap2";
int ii;
main()
{
int i;
char a[] ="char a[]";
char a1[] ="char a1[]";
static char a2[32] ="static char a2[10] ";
const char a3[32] ="const char a3[10] ";
char *ap ="char *ap";
static char *aptr ="static *aptr";
printf("strlen a[] %d \n",strlen(a));
printf("sizeof a[] %d \n",sizeof(a));
printf("a[sizeof] %d \n",a[strlen(a)]);
char help[20]="a b c d e ";
printf("local:\n&i %p %d \n",&i,i);
printf("a1 %p %s \n",a1,a1);
printf("a2 %p %s \n",a2,a2);
printf("a3 %p %s \n",a3,a3);
printf("*ap %p %s \n",ap,ap);
printf("*aptr %p %s \n",aptr,aptr);
printf("global:\n*ap1 %p %s \n",ap1,ap1);
printf("*ap2 %p %s \n",ap2,ap2);
printf("&ii %p %s \n",&ii,ii);
}
strlen a[] 8
sizeof a[] 9
a[sizeof] 0
local:
&i 0xbff103f8 -1074723816 < stack
a1 0xbff103e5 char a1[]
a2 0x8049940 static char a2[10]
a3 0xbff103c5 const char a3[10]
*ap 0x80486d8 char *ap
*aptr 0x80486cb static *aptr
global:
*ap1 0x80486b0 char *ap1
*ap2 0x80486ba static char *ap2
&ii 0x8049968 (null)
CC=gcc
S = file1.c file2.c
O = $(S:%.c=%.o)
exe: ${O}
$(CC) ${LIBS} -o $<
# pull in dependency info for *existing* .o files
-include $(OBJS:.o=.d)
%.o: %.c $(CC) ${INCLUDES} $(CFLAGS) -MMD -o $@ -c $<
gcc -MM $(CFLAGS) $*.c > $*.d
.PHONY clean
clean:
\rm -rf *.o exe
Note: Green highlighted stuff optional or use -MMD, are used to create dependencies
Another Example:--------------------
See
:help :compiler
:help :make
(the latter without a preceding exclamation mark) which will
automagically display the first error (if any) as soon as the make job
terminates. (Not sure if you'll get to the first _warning_ or _error_),
and a few other useful commands for use after that:
:cfir[st]
:cla[st]
:cn[ext]
:cp[revious]
:cnf[ile]
:cpf[ile]
for navigating the error list, and
:cope[n]
:ccl[ose]
to see it in its own window (the "quickfix" window), where hitting Enter
on an error moves to that line in the source. Of course, these commands
can be mapped for ease of use; for instance I have the following in my
vimrc:
:map :cnext
:map :cprev
which I use not so much for compiling but for the ":helpgrep" and
":vimgrep" commands (whose results also come in a quickfix window).
See also ":help quickfix.txt"
====================Vimdiff ==================
#!/bin/expect -f
# Parse argument Variables
set user [lrange $argv 0 0]
set ipaddress [lrange $argv 1 1]
spawn ssh -l user ipaddress
match_max 100000
# Look for passwod prompt
set timeout 2
expect "*(yes/no)?" {
send "yes\r"
}
expect "*?assword:*"
send "password\r"
interact
expect eof
#!/bin/bash
# require that all variables be set, otherwise the bash script will abort
set -o nounset
# pltTrace=2 # uncomment pltTrace to enable trace
export nodeType=""
export BaseProgName=`basename $0`
export ProgName=${BaseProgName}.$$
# if pltTrace is not already defined, define it
# this will allow individual programs to be
# debugged without turning on debugging for
# all scritps that source this file
if ! [ ${pltTrace:+1} ]
then
declare -x pltTrace=0
#change pltTrace to 1 to turn on debug for
# all scripts that haven't defined pltTrace
fi
if [ $pltTrace -ge 2 ]
then
PS4='${ProgName}:$LINENO: pltTrace-> '
set -o xtrace
fi
echo `date '+%Y%m%d.%H%M.%S'` ${BaseProgName} ": ENTER: Echoing here ..."
echo hello
if [ ! : ]; then
echo hello 2
fi
echo hello 3
ttest.16898:37: pltTrace-> date +%Y%m%d.%H%M.%S
test.16898:37: pltTrace-> echo 20101124.0558.51 test ': ENTER: creating ZFS pools and files systems ... starting'
20101124.0558.51 test : ENTER: creating ZFS pools and files systems ... starting
test.16898:40: pltTrace-> echo hello
hello
test.16898:42: pltTrace-> '[' '!' : ']'
test.16898:47: pltTrace-> echo hello 3
hello 3
mkdir profile
rem --- create ls command ---
echo @echo off > profile/ls.bat
echo dir >> profile/ls.bat
rem --- create pwd command ---
echo @echo off > profile/pwd.bat
echo cd >> profile/pwd.bat
--silent with make or '@' before every command to echo off -rm foo -include Makefile_vars inc.mk @echo " Only once printed ";from,to,text)pattern,replacement,text)string) $< $@ $? $*
%.o : %.c
        $(CC) -c $(CFLAGS) $(CPPFLAGS) $< -o $@
stdio.h>string.h>