Skip to content

Instantly share code, notes, and snippets.

View LoganGray's full-sized avatar
🎯
Focusing

Logan Gray LoganGray

🎯
Focusing
View GitHub Profile
@LoganGray
LoganGray / setconf.sh
Last active September 27, 2024 01:29
a somewhat supercharged configuration changer/add-er. If someone out there knows something better - please let me know! ;) Seems like this should already exist
#!/bin/bash
#set-conf bash thing
# for setting a configuration setting in a file defaulting with a : colon assignment
# and adds the setting if it doesn't find it.
#
#setconf <filepath&name> "string" "<setting>" [-y]
#i.e. setconf.sh /etc/datadog/datadog.yaml "api_key" "your_api_key_here" -y
# Color and formatting definitions
RED='\033[0;31m'
@LoganGray
LoganGray / tailscale.sh
Created November 16, 2023 20:27
tailscale install for steam deck - ref: https://tailscale.com/blog/steam-deck/
#!/usr/bin/env bash
# script originally from https://tailscale.com/blog/steam-deck/ 11/16/2023
set -euo pipefail
dir="$(mktemp -d)"
pushd .
cd "${dir}"
tarball="$(curl 'https://pkgs.tailscale.com/stable/?mode=json' | jq -r .Tarballs.amd64)"
version="$(echo ${tarball} | cut -d_ -f2)"
#!/bin/bash
# set -x
if [ -n "$SUDO_USER" ]; then
echo "Hello $SUDO_USER!!"
elif [ "$EUID" -eq 0 ]; then
echo "This script should NOT be run as root, please run it as a regular user with sudo."
exit 1
else
echo "Please run as a regular user with sudo."
@LoganGray
LoganGray / install_laravel_requirements.sh
Last active September 26, 2024 21:26
laravel 2024 setup on Linux Dev box - this'll basically install all the standard stuff. with option to install DB
#!/bin/bash
# Update package list
sudo apt update
# Install PHP and required extensions
sudo apt install -y php php-cli php-fpm php-json php-common php-zip php-gd php-mbstring php-curl php-xml php-bcmath
# Install Composer
curl -sS https://getcomposer.org/installer | php