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
@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
pehla_nasha==https://wmirchi-lh.akamaihd.net/i/WMIRCHI_1@75780/master.m3u8
hello_fm==6829847d-14f5-42aa-82e3-9ac04846e0b4
purani_jeans==https://puranijeanshdliv-lh.akamaihd.net/i/PuraniJeansHDLive_1_1@334555/index_1_a-p.m3u8?sd=10&rebase=on
club==https://clubmirchihdlive-lh.akamaihd.net/i/ClubMirchiHDLive_1_1@336269/master.m3u8
ishq==https://ishq_kolkata-lh.akamaihd.net/i/Ishq_Kolkata_1@854569/master.m3u8
ishq_kolkata==https://ishq_kolkata-lh.akamaihd.net/i/Ishq_Kolkata_1@854569/master.m3u8
NDTV==https://ndtv24x7elemarchana.akamaized.net/hls/live/2003678/ndtv24x7/ndtv24x7master.m3u8
kalighat_radio==https://onlineradiobox.com/json/in/kalighatradio/play?platform=web
hungama_evergreen_bollywood==https://onlineradiobox.com/json/in/evergreenbollywood/play?platform=web
hungama_edm==https://onlineradiobox.com/json/in/bestofedm/play?platform=web
@deep5050
deep5050 / book_quotes.yml
Created December 22, 2022 09:45
book_quotes_on_new_issue
jobs:
comment_quote:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Fetch book quotes
run: |
curl https://raw.githubusercontent.com/<username>/<repository>/master/quotes.json --output quotes.json
- name: Select random quote
@deep5050
deep5050 / bing_wallpaper_dowanload-daily.yml
Created December 22, 2022 06:17
github workflow to download bing wallpapers daily
name: Bing Wallpaper Download
on:
schedule:
- cron: "0 0 * * *"
jobs:
download_wallpaper:
runs-on: ubuntu-latest
steps:
@deep5050
deep5050 / greet_issue_raiser.yml
Created December 22, 2022 06:16
greet an issue raiser on new issues
name: Issue Greeting
on:
issues:
types: [opened]
jobs:
greet_user:
runs-on: ubuntu-latest
steps:
https://www.prothomalo.com/topic/%E0%A6%97%E0%A6%B2%E0%A7%8D%E0%A6%AA
https://www.kishoralo.com/golpo/%E0%A6%B6%E0%A6%BF%E0%A6%95%E0%A7%8D%E0%A6%B7%E0%A6%BE%E0%A6%B8%E0%A6%AB%E0%A6%B0-%E0%A6%AC%E0%A6%9F%E0%A7%87
https://www.w3newspapers.com/bangladesh/
https://www.prothomalo.com/onnoalo/stories/
https://www.jugantor.com/literature/355847/%E0%A6%9B%E0%A7%8B%E0%A6%9F-%E0%A6%97%E0%A6%B2%E0%A7%8D%E0%A6%AA-%E0%A6%AA%E0%A6%BE%E0%A6%B9%E0%A6%BE%E0%A6%A1%E0%A6%BC%E0%A6%BF-%E0%A6%B0%E0%A6%B6%E0%A7%81
cloc ./ --quiet --hide-rate --unix --timeout=10 --by-file-by-lang --md --vcs=git --git --ignored=ignored.txt --by-percent=cmb