Skip to content

Instantly share code, notes, and snippets.

View JackDesBwa's full-sized avatar

JackDesBwa JackDesBwa

  • France
  • 08:33 (UTC +02:00)
View GitHub Profile
@JackDesBwa
JackDesBwa / ascii.rst
Last active October 20, 2023 12:25
A stereoscopic ASCII art

SBS

o===============================================================================oo===============================================================================o
|        .                    .                    .                    .       ||         .                    .                    .                    .      |
|        :                    :                    :                    :       ||         :                    :                    :                    :      |
|        :    .               :    .               :    .               :       ||         :    .               :    .               :    .               :      |
|       .'   .   .           .'   .   .           .'   .   .           .'   .   ||        .'   .   .           .'   .   .           .'   .   .           .'   .  |
#!/usr/bin/env python3
"""
Simple live plot reading serial data
Graph is not exact as it can be altered by delays in serial communication and plot time, but it is useful nonetheless
Usage example: ./live_serial_plot.py --tty /dev/ttyUSB0 --plot var1 --plot var2 --plot_n vars3 2 --save ./log.csv
Data on the serial line for the above command: [note: space after prefix is optional]
var1 1.4427
@JackDesBwa
JackDesBwa / auto-theme.nvim.lua
Created July 22, 2026 17:39
auto-theme.nvim.lua
-- Plugin nvim to change nvchad base46 theme, when gsettings notifies color-scheme change
-- See `:h nvui.chadrc.options` and set `base46.theme` and `base46.theme_toggle` options
local function apply_theme(theme)
local dark_theme_name = require('nvconfig').base46.theme_toggle[1]
local current_theme_name = require('nvconfig').base46.theme
local rq_dark = (theme == "prefer-dark")
local is_dark = (current_theme_name == dark_theme_name)
if rq_dark ~= is_dark then