Skip to content

Instantly share code, notes, and snippets.

View P403n1x87's full-sized avatar
⚒️
Tinkering

Gabriele N. Tornetta P403n1x87

⚒️
Tinkering
View GitHub Profile
@wadimw
wadimw / adaptMonitorBrightness-M27Q.py
Last active June 1, 2024 20:45
Python script for MacOS which changes brightness of Gigabyte M27Q KVM Monitor to match current brightness of builtin MacBook Pro display; this is instead of Lunar app, because DDC/CI commands do not work for me over USB-C DisplayPort
#!/usr/local/bin/python3
# For Gigabyte M27Q KVM connected over USB-C
#
# Reads brightness value of builtin display from system, adapts it (Lunar-style) and sends over USB command to external display
#
# You need PyUSB and PyObjC
#
# Not much testing was done so far, only on MBP A1990 15" 2019 i7 555X
#
@kdabir
kdabir / latest_version.groovy
Created April 2, 2016 14:17
Getting latest version of artifact from maven repository
def metadata = new XmlSlurper().parse("https://dl.bintray.com/kdabir/glide/io/github/kdabir/glide/glide-gradle-plugin/maven-metadata.xml")
println metadata.versioning.latest
println metadata.versioning.versions.version*.text()