Skip to content

Instantly share code, notes, and snippets.

@anlai
anlai / setfanspeed.sh
Created November 18, 2020 06:44
Set fanspeed on Lenovo SA120 on Unraid
#!/bin/bash
# Script to change the fanspeed of the Lenovo SA120 server
# Depends on:
# sg3_utils https://slackware.pkgs.org/14.2/slackware-x86_64/sg3_utils-1.42-x86_64-1.txz.html
# fancontrol.py https://github.com/AndrewX192/lenovo-sa120-fanspeed-utility
SPEED=${1:-2}
installpkg sg3_utils-1.42-x86_64-1.txz
@anlai
anlai / Trakt Add Episode to List.js
Created January 2, 2023 04:19
Script that can be used in the browser console to add all the episodes on a Trakt season page to a list. (If used on a List page, it will remove all the episodes as well).
var lists = $('.trakt-icon-list-thick');
lists.each(function(){
this.click();
$(this).closest('a.list').siblings('.popover.with-list').find("li[data-list-id='{LIST_ID_HERE}']").click();
});