Skip to content

Instantly share code, notes, and snippets.

View prashant3285's full-sized avatar

Prashant Verma prashant3285

View GitHub Profile
@prashant3285
prashant3285 / log_erase.sh
Created May 18, 2025 06:09
Erasing big log files using the script with Crontab
#!/bin/bash
LOGFILESYSLOG=/var/log/syslog
if [ -f "$LOGFILESYSLOG" ]; then
echo "" > $LOGFILESYSLOG
fi
LOGFILESYSLOG1=/var/log/syslog.1
if [ -f "$LOGFILESYSLOG1" ]; then
echo "" > $LOGFILESYSLOG1
@prashant3285
prashant3285 / image_converter_AVIF.py
Last active November 15, 2024 10:34
Image to AVIF conversion in Python
# pip install pillow
# pip install pillow-avif-plugin
# add image files to Input folder and run the script
# converted files will be stored in output folder
# change folder path at the end of file
import os
from PIL import Image
import glob
import pillow_avif
@prashant3285
prashant3285 / image_resize_convert_AVIF.py
Last active November 14, 2024 06:37
PNG/JPEG image resize(600 x 600px) and convert to AVIF
# pip install pillow
# pip install pillow-avif-plugin
# add square large size files JPG and PNG in Input folder and run the script
# converted files will be stored in output folder
# change folder path at the end of file
import os
from PIL import Image
import glob
import pillow_avif
@prashant3285
prashant3285 / live_plot_ILI9486_ESP32
Created November 8, 2023 17:45
Live Plot Sensor Data on TFT Display ILI9486 using ESP32 - For more details read blog https://blog.kamlatech.in/2023/11/live-plot-sensor-data-on-tft-display.html
/*
This program provides cartesian type graph function
Revisions
rev date author description
1 12-24-2015 kasprzak initial creation
Updated by Bodmer to be an example for the library here:
https://github.com/Bodmer/TFT_eSPI