Skip to content

Instantly share code, notes, and snippets.

View samuelcaldas's full-sized avatar
💭
I may be slow to respond.

Samuel Caldas samuelcaldas

💭
I may be slow to respond.
View GitHub Profile
@krrr
krrr / brightness.ahk
Last active November 12, 2024 21:47
Windows screen brightness fine tune (autohotkey)
#,::
AdjustScreenBrightness(-3)
Return
#.::
AdjustScreenBrightness(3)
Return
AdjustScreenBrightness(step) {
service := "winmgmts:{impersonationLevel=impersonate}!\\.\root\WMI"
@qwerty12
qwerty12 / BrightnessSetter.ahk
Last active July 25, 2023 13:06
BrightnessSetter: set laptop brightness and show Windows 10's native brightness OSD (https://github.com/qwerty12/AutoHotkeyScripts/tree/master/LaptopBrightnessSetter)
class BrightnessSetter {
; qwerty12 - 27/05/17
; https://github.com/qwerty12/AutoHotkeyScripts/tree/master/LaptopBrightnessSetter
static _WM_POWERBROADCAST := 0x218, _osdHwnd := 0, hPowrprofMod := DllCall("LoadLibrary", "Str", "powrprof.dll", "Ptr")
__New() {
if (BrightnessSetter.IsOnAc(AC))
this._AC := AC
if ((this.pwrAcNotifyHandle := DllCall("RegisterPowerSettingNotification", "Ptr", A_ScriptHwnd, "Ptr", BrightnessSetter._GUID_ACDC_POWER_SOURCE(), "UInt", DEVICE_NOTIFY_WINDOW_HANDLE := 0x00000000, "Ptr"))) ; Sadly the callback passed to *PowerSettingRegister*Notification runs on a new threadl
OnMessage(this._WM_POWERBROADCAST, ((this.pwrBroadcastFunc := ObjBindMethod(this, "_On_WM_POWERBROADCAST"))))
@stanleyondrus
stanleyondrus / ArduinoMidiDrumsCustom.ino
Last active January 26, 2024 18:46
Custom code for ArduinoMidiDrums - 10 drum pads, no hi-hat pedal
// *****************************************************************************************************************
// * *
// * Arduino MIDI Drums *
// * 2017 (c) StanleyProjects.com *
// * *
// * Custom code - no hi-hat pedal, 10 drum pads *
// *****************************************************************************************************************
#define NUMBER_OF_PADS 10 // number of drum pads (analog inputs)