Skip to content

Instantly share code, notes, and snippets.

View marian-pritsak's full-sized avatar

Marian Pritsak marian-pritsak

View GitHub Profile
@marian-pritsak
marian-pritsak / vxlan_rif.c
Last active January 28, 2021 01:34
vxlan_rif.c
sx_status_t get_vxlan_tunnel_rif(sx_api_handle_t *handle, sx_router_interface_t *rif)
{
sx_tunnel_id_t vxlan_tunnel_id = 0x8c00000;
sx_tunnel_attribute_t vxlan_attribs;
sx_status_t rc = sx_api_tunnel_get(*handle, vxlan_tunnel_id, &vxlan_attribs);
if (rc != SX_STATUS_SUCCESS) {
return rc;
}
alias q="cd ../"
alias qq="cd ../../"
alias qqq="cd ../../../"
alias gr="grep -rn"
alias v="TTY=`tty | tr '/' '-'` vim"
alias src="source ~/.bashrc"
alias cls="ls *.c *.cpp *.h *.py *.lua"
alias run_tmux='tmux attach -t $USER || tmux new -s $USER'
set shiftwidth=4
set smartindent
set cindent
set hlsearch
set incsearch
set expandtab
set laststatus=2
set statusline=%f
syntax enable
colorscheme monokai
@marian-pritsak
marian-pritsak / sonic.vim
Last active January 8, 2019 10:44
Vim environment for SONiC
let sonic_root = getcwd()
let swss_path = sonic_root . "/src/sonic-swss"
let orch_path = swss_path . "/orchagent"
let sairedis_path = sonic_root . "/src/sonic-sairedis"
let swss_common_path = sonic_root . "/src/sonic-swss-common"
let sai_path = sonic_root . "/platform/mellanox/mlnx-sai/SAI-Implementation/mlnx_sai"
let sai_inc_path = sonic_root . "/platform/mellanox/mlnx-sai/SAI-Implementation/mlnx_sai/inc/sai"
let swss_common_inc_path = sonic_root . "/src/sonic-swss-common/common"
execute "set path+=".escape(g:sai_inc_path, ' ')