This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
audiobookshelf setup for Raspberry Pi - Raspbian GNU/Linux 11 (bullseye) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Update package lists | |
echo "Updating package lists..." | |
sudo apt update | |
# Install build-essential, kernel headers, and dkms | |
echo "Installing build-essential, kernel headers, and dkms..." | |
sudo apt install -y build-essential linux-headers-$(uname -r) dkms |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Update package lists | |
sudo apt-get update && \ | |
# Install necessary packages for HTTPS transport | |
sudo apt-get install apt-transport-https && \ | |
# Add the Plex Media Server signing key | |
curl https://downloads.plex.tv/plex-keys/PlexSign.key | gpg --dearmor | sudo tee /usr/share/keyrings/plex-archive-keyring.gpg >/dev/null && \ | |
# Add Plex repository to the system | |
echo deb [signed-by=/usr/share/keyrings/plex-archive-keyring.gpg] https://downloads.plex.tv/repo/deb public main | sudo tee /etc/apt/sources.list.d/plexmediaserver.list && \ | |
# Update package lists again with the new Plex repository | |
sudo apt-get update && \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Update the LVM partition sizes for the data disk after EBS resize | |
sudo pvresize /dev/nvme1n1 | |
sudo lvextend -l +100%FREE /dev/mapper/data-lvol0 | |
#Update the EXT4 partition sizes for the root disk after EBS resize | |
sudo growpart /dev/nvme0n1 1 | |
sudo resize2fs /dev/nvme0n1p1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String parentHandle = driver.getWindowHandle(); // get the current window handle | |
driver.findElement(By.xpath("//*[@id='someXpath']")).click(); // click some link that opens a new window | |
for (String winHandle : driver.getWindowHandles()) { | |
driver.switchTo().window(winHandle); // switch focus of WebDriver to the next found window handle (that's your newly opened window) | |
} | |
//code to do something on new window | |
driver.close(); // close newly opened window when done with it |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Grab(group='commons-net', module='commons-net', version='2.0') | |
@Grab(group='com.jcraft', module='jsch', version='0.1.51') | |
import org.apache.commons.net.ftp.FTPSClient | |
import com.jcraft.jsch.*; | |
///////////////////////////////////////////////////////////// | |
/////////////////////////Configs///////////////////////////// | |
///////////////////////////////////////////////////////////// | |
String ftpdomain = "yourdomain.org" |