Skip to content

Instantly share code, notes, and snippets.

View e28eta's full-sized avatar

Dan Jackson e28eta

View GitHub Profile
@e28eta
e28eta / gist:3d8ed34e155123e5220ddff499a2dbef
Created April 15, 2022 23:09
Inverts scrollwheel direction for pi400 mouse
# for bullseye, this is what worked for me:
gsettings set org.gnome.desktop.peripherals.mouse natural-scroll true
# after having spent a bunch of time trying to get xinput / xorg.conf.d files to match, it _was_ matching but not actually working 🤷‍♂️
@e28eta
e28eta / renew_ssl_cert.yaml
Last active February 17, 2023 00:15 — forked from TJ-developer/renew_ssl_cert.yaml
Homeassistant Blueprint for SSL-Certificate renewal
blueprint:
name: Renew Let's Encrypt Certificate
description: Renew Certificate when due date is below given value
domain: automation
input:
cert_expiry_sensor:
name: Certificate Expiry Sensor
description: Sensor from the Certificate Expiry Integration (https://www.home-assistant.io/integrations/cert_expiry)
selector:
entity:
@e28eta
e28eta / install_dash_gem_docs.rb
Created February 15, 2022 20:11 — forked from invalidusrname/install_dash_gem_docs.rb
Installs the Dash docs for all the Ruby Gems in your Gemfile
#!/usr/bin/env ruby
#
# Prerequisites:
# gem install bundler
# bundle install
dependencies = `bundle show | grep '*' | awk '{print $2, $3}' | sed -e 's/(//' -e 's/)//'`.split("\n")
dependencies.each do |dependency|
(gem_name, version) = dependency.split
@e28eta
e28eta / com.github.nfarina.homebridge.plist
Last active January 19, 2017 05:13
Launchd.plist for running nfarina/homebridge from /etc/homebridge while the computer is running. Probably adapted from somewhere, but I don't remember where.
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>Label</key> <string>com.github.nfarina.homebridge</string> <key>EnvironmentVariables</key> <dict> <key>PATH</key> <string>/usr/local/bin/:/usr/bin:$PATH</string> </dict> <key>ProgramArguments</key> <array> <string>/usr/local/bin/homebridge</string> <string>-U</string> <string>/etc/homebridge/</string> </array> <key>KeepAlive</key> <true /> <!-- <key>RunAtLoad</key> <true/> <key>KeepAlive</key> <dict> <key>SuccessfulExit</key> <false/> </dict> --> <key>StandardErrorPath</key> <string>/Library/Logs/homebridge.log</string> <key>StandardOutPath</key> <string>/Library/Logs/homebridge.log</string> </dict> </plist>
@e28eta
e28eta / org.djackson._xcode_redirect_disable.plist
Created January 19, 2017 04:15
Per [HT205290](https://support.apple.com/en-us/HT205290), every time Xcode service is restarted, or Server.app is updated, Apache will redirect `GET /` to `GET /xcode/` Which is something I definitely don't want on a shared web server. I think this launchd plist will automatically prevent that.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>org.djackson.XcodeRedirectDisable</string>
<key>ProgramArguments</key>
<array>
<string>sh</string>
<string>-c</string>