Skip to content

Instantly share code, notes, and snippets.

@abnl
abnl / remove-dotnet-version.sh
Created March 26, 2024 12:22
.sh to remove dotnet versions (sdks and runtimes)
#!/bin/bash
# Assigns parameters to variables
sdkVersion=$1
runtimeVersion=$2
# Searches for and removes the specified SDK and runtime paths
find /usr/local/share/dotnet/ -type d -name "*$sdkVersion*" | while read sdkPath; do
echo "Removing SDK: $sdkPath"
sudo rm -rf "$sdkPath"
@abnl
abnl / osx_uninstall_mysql_install_mariadb_homebrew.md
Created October 18, 2020 13:27 — forked from brandonsimpson/osx_uninstall_mysql_install_mariadb_homebrew.md
OSX How To: Uninstall native MySQL and install MariaDB via Homebrew

OSX How To: Uninstall native MySQL and install MariaDB via Homebrew

This is a short overview on how to completely remove any old mysql server installs in OSX and upgrade to MariaDB without conflicts. Things can get a bit weird when you have various old installs of MySQL server floating around, and utilizing homebrew to install and upgrade MariaDB as a drop in replacement for MySQL has worked well, especially if you're used to managing MySQL installs via yum in linux.

First: Backup Your Data!

Backup all of your current databases with mysqldump

This isn't a tutorial on backups, and there are many ways to do it. You should know how to backup your data anyway. For this example, we'll do a full backup of our InnoDB databases.

@abnl
abnl / generate-ssh-key.sh
Last active September 17, 2020 15:47 — forked from grenade/01-generate-ed25519-ssh-key.sh
Correct file permissions for ssh keys and config.
ssh-keygen -t rsa -b 4096 -N '' -C "your-email@gmail.com" -f ~/.ssh/id_rsa
ssh-keygen -t rsa -b 4096 -N '' -C "your-email@gmail.com" -f ~/.ssh/github_rsa
ssh-keygen -t rsa -b 4096 -N '' -C "your-email@gmail.com" -f ~/.ssh/mozilla_rsa