Skip to content

Instantly share code, notes, and snippets.

View mmdmthr's full-sized avatar

Hari mmdmthr

View GitHub Profile
@mmdmthr
mmdmthr / gist:ceafd3ea88c3d625b2a50103c942ef93
Created June 30, 2025 03:06
Adjust webcam brightness in Ubuntu using the v4l2-ctl command
# v4l2-ctl is a command inside the package named v4l-utils.
sudo apt-get install v4l-utils
# find the device name of the webcam (e.g., /dev/video0)
v4l2-ctl --list-devices
# replacing /dev/video0 with your device name and 128 with your desired brightness level (0-255)
@mmdmthr
mmdmthr / gist:96a3b44913453f69cd6b018ec0ff1695
Created October 4, 2023 12:59
git: display count of changed files and lines in terminal
git --no-pager diff --shortstat master
// result
38 files changed, 704 insertions(+), 683 deletions(-)
@mmdmthr
mmdmthr / API Contract Example Spec.md
Created April 27, 2022 01:37 — forked from BeattieM/API Contract Example Spec.md
An example of an API contract between the server and front-end devices

#Users

  • User object
{
  id: integer
  username: string
  email: string
  created_at: datetime(iso 8601)
  updated_at: datetime(iso 8601)
}
@mmdmthr
mmdmthr / convert
Last active December 4, 2021 13:11 — forked from ahadyekta/convert
Batch convert JPG to WebP in Ubuntu
#First install the webp converter by this
sudo apt-get install webp
#go inside the directory where all images are there
#make sure all images are in RGB color mode, otherwise you will get error for CMYK images.
#Convert all images to RGB by this command (you should install ImageMagik to do that)
for f in *.jpg; do convert -colorspace RGB "$f" "${f}"; done
#finally convert all images to Webp format