Skip to content

Instantly share code, notes, and snippets.

View deep5050's full-sized avatar
💻
EMBEDDED SYSTEM

Dipankar Pal deep5050

💻
EMBEDDED SYSTEM
View GitHub Profile
#!/bin/bash
if [ $# -lt 2 ]; then
echo "Usage: $0 <file_path> <public/private>"
exit 1
fi
file_path=$1
visibility=$2
inljnlnlnlnlnlnkh kj
inljnlnlnlnlnlnkh kj
bkjbbmn mnbmbmb
@deep5050
deep5050 / ONIE.md
Created November 4, 2023 17:04
install ONIE in qemu/KVM

Building and Installing ONIE on KVM/QEMU (Open Network Install Environment) with DUE

In this guide, we will walk through the steps to build and install ONIE (Open Network Install Environment) on KVM/QEMU using the DUE tool. DUE is used to create a Debian Docker environment for cross-compiling ONIE. Here are the steps involved:

Step 1: Install DUE To get started, you need to install DUE. DUE is used to create a Debian Docker environment for cross-compiling ONIE. First, clone the DUE repository and navigate to the DUE directory.

git clone https://github.com/CumulusNetworks/DUE.git
cd DUE
@deep5050
deep5050 / twine.py
Created September 6, 2023 11:43
python build and publish instructions
python3 setup.py build
python3 setup.py install
python3 setup.py sdist
python3 setup.py bdist_wheel
#test upload
twine upload --repository-url https://test.pypi.org/legacy/ dist/*
twine upload --repository-url https://upload.pypi.org/legacy/ dist/*
@deep5050
deep5050 / colors.py
Created September 5, 2023 17:44
ANSI colors
# ANSI colors
class Colors(object):
def __init__(self) -> None:
self.HEADER = '\033[95m'
self.OKBLUE = '\033[94m'
self.OKCYAN = '\033[96m'
self.OKGREEN = '\033[92m'
self.WARNING = '\033[93m'
self.FAIL = '\033[91m'
self.ENDC = '\033[0m'
@deep5050
deep5050 / PS.md
Last active August 31, 2023 07:13
Linux shell prompt with last three directories

PS1='\[\033[01;32m\]\u@\[\033[00;33m\]$(dirname "$(dirname "$PWD")" | xargs basename 2>/dev/null || echo "")$(if [[ "$PWD" != "/" ]]; then echo "/$(dirname "$PWD" | xargs basename 2>/dev/null || echo "")/$(basename "$PWD")"; fi)\[\033[00m\]\$ '

example:

deep@/COMMSCOPE/fastiron-10010a/ICX8200$ ll
total 0
drwxrwxrwx 1 deep deep 4096 Aug 30 13:10 ./
drwxrwxrwx 1 deep deep 4096 Aug 30 13:10 ../
drwxrwxrwx 1 deep deep 4096 Aug 31 12:20 Firmware/
@deep5050
deep5050 / vim.md
Created April 23, 2023 06:50
Vim cheatsheet

Vim Cheatsheet

Global

:help keyword # open help for keyword
:o file       # open file
:saveas file  # save file as
:close        # close current pane