Skip to content

Instantly share code, notes, and snippets.

@kchawla-pi
kchawla-pi / client.py
Created October 26, 2023 20:51 — forked from vsajip/client.py
Run a logging socket receiver in a production setting with logging from an example webapp
from concurrent.futures import ThreadPoolExecutor, as_completed
import json
import urllib.request
with open('webapp.json', encoding='utf-8') as f:
config = json.loads(f.read())
URLS = [
'http://localhost:%d/?ident=%d' % (config['port'], ident)
for ident in range(1, 1001)
@kchawla-pi
kchawla-pi / nvidia-xfce-desktop-container-popos-22.04
Created October 26, 2023 02:45 — forked from sandman/nvidia-xfce-desktop-container-popos-22.04
Installing and running a Dockerized NVIDIA Xfce desktop with ROS2 Foxy
# Install latest version nvidia-docker2 on PopOS 22.04
## PopOS does not take the latest upstream NVIDIA Container runtime which is needed to run the container
## Run the below steps
### Add a new preference entry in /etc/apt/preferences.d/pop-default-settings
Package: *
Pin: origin nvidia.github.io
Pin-Priority: 1002
@kchawla-pi
kchawla-pi / git-credential-helper-libsecret.sh
Created October 26, 2023 02:45 — forked from P403n1x87/git-credential-helper-libsecret.sh
Store git credentials securely on Ubuntu
#!/bin/bash
set -e
sudo apt-get -y install libsecret-1-0 libsecret-1-dev libglib2.0-dev
sudo make --directory=/usr/share/doc/git/contrib/credential/libsecret
git config --global credential.helper /usr/share/doc/git/contrib/credential/libsecret/git-credential-libsecret
@kchawla-pi
kchawla-pi / plugin_architecture.md
Created February 23, 2023 22:53 — forked from dorneanu/plugin_architecture.md
Python: Implement basic plugin architecture with Python and importlib

Implementing a basic plugin architecture shouldn't be a complicated task. The solution described here is working but you still have to import every plugin (inheriting from the base class).

This is my solution:

Basic project structure

$ tree