Tag: bash

  • Capturing MacOS Settings Changes

    Capturing MacOS Settings Changes

    Let me get this right out. I upgraded to MacOS 15 beta and it totally borked my machine. I had to do a full, fresh reinstall. Totally my fault, and I should have prepared better. So now, I’m trying to remember to capture my personal settings so I can use a shell script to restore…

  • Sending Prowl Alerts via Bash

    Sending Prowl Alerts via Bash

    Learn how to send alerts using Prowl for server scripting, ensuring proper alert notifications, even after struggling with other options like Twilio.

  • Supercharge Your Clipboard with a Shell Function for iTerm2

    Supercharge Your Clipboard with a Shell Function for iTerm2

    Discover a nifty shell function tailored for iTerm2 on macOS, bridging the gap between your terminal and clipboard, making it seamless to copy content directly to your clipboard, even from remote servers.

  • Bad Hack: Restart Linux Server when memory is low 😬

    Bad Hack: Restart Linux Server when memory is low 😬

    A hack on a Raspberry Pi server uses a script to monitor and restart the server if memory is too low. Checking swap and physical memory, it reboots if levels drop below specific thresholds. Scheduled to run every five minutes, the script logs instances when it prevents system freezes by rebooting.

  • Quick Tip: Bash CLI params

    Quick Tip: Bash CLI params

    Learn a clean and simple way to add CLI params to a bash script by incorporating short, long, space-separated, and equal-separated arguments for ease. Ideal for quick bash script hacks, this method facilitates efficient handling of CLI parameters.

  • Quick Tip: Looping a command in bash

    Quick Tip: Looping a command in bash

    Discover how to monitor disk space usage efficiently while running slow programs to prevent sudden command failures. Use `watch -n10 bash -c “df -h | ack disk1s5″` for real-time updates, where `disk1s5` represents the desired partition. Run `df` to find the correct device file.