Skip to content

Instantly share code, notes, and snippets.

@kris-anderson
kris-anderson / fullscreen.sh
Created November 22, 2023 06:17
Script to have Amethyst.app switch to fullscreen in every space when on a laptop
#!/bin/sh
# disable shellcheck checks in entire file
# shellcheck disable=SC1090,SC1091
MONITOR_SIZE=$(osascript -e 'tell application "Finder" to get bounds of window of desktop')
if [ "$MONITOR_SIZE" = "0, 0, 1536, 960" ] || [ "$MONITOR_SIZE" = "0, 0, 1728, 1117" ]; then
#############
@kris-anderson
kris-anderson / nut_package_fix.yml
Last active August 19, 2023 11:09
pfSense NUT Package Fix Through Ansible
---
- name: get sha256sum of /usr/local/libexec/nut/usbhid-ups
stat:
path: /usr/local/libexec/nut/usbhid-ups
checksum_algorithm: sha256
get_checksum: yes
register: nut_orig
- name: backup original /usr/local/libexec/nut/usbhid-ups
copy:
@kris-anderson
kris-anderson / gist:3d91a8d7e5e050558f9b
Created January 30, 2015 01:59
Enable Subsonic SSL on Ubuntu 14.04 using StartSSL
1.) Download the certificates from StartSSL:
Private Key (myserver.key)
Server Certificate
CA Certificate
Intermediate Certificate
2.) Copy the contents from the above certificates and paste them into a new server.crt file.
3.) Next, convert the cert from PEM to PKCS12 format using the following command: