Skip to content

Instantly share code, notes, and snippets.

View pipelinedave's full-sized avatar
manifesting the desired state

David "pipelinedave" Hallmann pipelinedave

manifesting the desired state
View GitHub Profile
@pipelinedave
pipelinedave / three_finger_touchpad_desktop_switch.sh
Created September 20, 2023 13:52
Switch virtual desktop on three finger touchpad swipe with this bash script
#!/bin/bash
# ----------------------------------------------------------------------------
# Script Name: three_finger_touchpad_desktop_switch.sh
# Description: Switch desktops using a 3-finger swipe gesture
# Author: github.com/pipelinedave
# Version: 1.1
# Usage: sudo sh three_finger_touchpad_desktop_switch.sh
# Note: Update the "device" variable to point to your actual input device.
# ----------------------------------------------------------------------------
@pipelinedave
pipelinedave / bluetooth_keyboard_udev_ruler.sh
Created June 25, 2023 18:54
create udev rule to disable built-in device on bluetooth connection, e.g. disable laptop keyboard when bluetooth keyboard is connected
#!/bin/bash
# Prompt for the device event number
read -p "Enter the device event number: " event_number
# Display udev rules
udevadm info --attribute-walk --path=$(udevadm info --query=path --name=/dev/input/event${event_number})
read -p "Enter the KERNELS value: " kernels_value
read -p "Enter the SUBSYSTEMS value: " subsystems_value
@pipelinedave
pipelinedave / butane.ign
Created June 9, 2023 21:15
fedora CoreOS ignition file with my personal ssh key configured for user core
{
"ignition": {
"version": "3.3.0"
},
"passwd": {
"users": [
{
"name": "core",
"sshAuthorizedKeys": [
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDBbbxEbC2Kz72u+dIEZeOOYsgrwDlLQFsE9+iqvU2COTKBEEY+Kog3dO5UNdDUkyoYuzOddcVbbc8nYdYbjuKV+Ab0+FcX0qTIEsWjobET9myulReMCdx78LExcA9HlLqumvHs1VNiVbzJBrpsXzf9RKZIsgufZtpbHJCEtGfj/tHYWHNW03Xv+7JCfAQ2GARJ2XqYWRlfqjGPe/mRbuxLjDOgwRrPU1NN5BCp5SnCC+gVrIOIp31XlMzbJHSEDnnQG6yZ6qjWRndJTehHIlapinD4fC4qlTSRNx1sXGUfR1SnUBb8JfIuEl1kBnjOAV8Tfd24iAsxbC7eL7PhUgzxxxk0S6bsNNuuqp7C7J67mhFKK8dFq8V4hs4ckLdwkMqgqeWMkAEr1liVjTg42skTk0F4HB+iBGFgI/Xnoz7a2Q6gZzWVQm3J62JXqMBtp34nq4lMzsLy3d4J04Pk6m+1PUsLs5J+J+pKKHl1PUX4bY7siTm9epR3IKeUKe3LmVG3vO8CDLaXb8AJPtlDpNUlO26BFUCtcmH4iqVRuD6FBS42vXgXvsQAgGwevCQUtcAgAprgUxlsIYk4e3gvTfdnt3Xf8pxabkR2izxBX4y2j08TenIRZ5AJNMzyP6Oy0zpumpTJjOlRwXAlkdbX4BUUuSG2/LhI66U0YQnL46Kk9Q== feddy@fedora"
@pipelinedave
pipelinedave / Identify display hardware & find correct drivers.md
Last active June 9, 2023 11:54
Identify the hardware: You need to know exactly what hardware you're dealing with to get the right drivers. For graphic cards, you can use the following command in your terminal to get the necessary information:
  1. Identify the hardware: You need to know exactly what hardware you're dealing with to get the right drivers. For graphic cards, you can use the following command in your terminal to get the necessary information:

    lspci | grep -i --color 'vga\|3d\|2d'
    

    This command will display the VGA compatible devices in your system. Look for the details of your graphic card in the output.

  2. Check the driver in use: You can check which driver your system is currently using with the following command:

@pipelinedave
pipelinedave / .bashrc
Last active April 17, 2023 17:56
kde-konsole-ssh-profile-switcher-bash-script
# KDE Konsole SSH Profile Switcher
# A shell function for KDE Konsole terminal users to automatically switch the
# terminal profile based on the SSH hostname, and restore the default profile
# upon disconnection. Works with additional SSH options.
# Compatible with Bash and Zsh.
# Make sure to create corresponding Konsole profiles for each SSH hostname
# before using this function.
# For example, if you're connecting to "example.com", create a profile named
# "example.com" in Konsole with your desired settings.
# Add this function to your shell configuration file (e.g., ~/.bashrc for Bash
@pipelinedave
pipelinedave / docker-compose.yml
Last active April 1, 2023 20:07
home-assistant in docker-compose
version: '3.8'
services:
homeassistant:
build:
context: home-assistant
container_name: home-assistant
restart: unless-stopped
# Expose the Home Assistant web interface
ports:
- "8123:8123"

Keybase proof

I hereby claim:

To claim this, I am signing this object:

#!/bin/bash
HOST=myhostname
USERNAME=myusername
HOME_DIR="/home/${USERNAME}"
SWAP_SIZE=4G
echo DISK="$1", HOST="$HOST", USERNAME="$USERNAME", HOME_DIR="$HOME_DIR"
# grub as a bootloader
#!/bin/bash
DISK="/dev/$1"
PARTITION="${DISK}1"
echo DISK="$DISK", PARTITION="$PARTITION"
parted -s "$DISK" mklabel msdos
parted -s -a optimal "$DISK" mkpart primary ext4 0% 100%
parted -s "$DISK" set 1 boot on
#!/bin/bash
PS3='Select Environment: '
options=("Local VM" "Other")
select opt in "${options[@]}"
do
case "$opt" in
"VirtualBox")
DISK=sda
PORT=2222