Skip to content

Instantly share code, notes, and snippets.

View minuz's full-sized avatar

Fernando Minoru Baba minuz

  • Xemplo
  • Sydney, Australia
View GitHub Profile
@minuz
minuz / mac-setup.sh
Created January 17, 2025 21:56
Basic setup for development on mac
#!/bin/sh
printf "# Step 1 : Installing Xcode Command Line Tools"
xcode-select --install
echo "# Step 2 : Installing/Updating Homebrew"
# Check for Homebrew and install if not found
if test ! $(which brew); then
echo "Installing Homebrew..."
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
else
@minuz
minuz / replace-env-variables-json.sh
Created June 28, 2024 04:14
Replace Pipeline environment Variables
#!/bin/bash
# Initialize empty JSON object
json_object="{}"
# Loop through pipeline variables starting with VITE_
for var_name in "${!VITE@}"; do
# Check if variable starts with VITE_ (avoids unrelated variables)
if [[ $var_name =~ ^VITE_ ]]; then
# Extract variable value
@minuz
minuz / add-alias.sh
Created June 5, 2024 00:35
Add Command alias on MacOS
#!/bin/bash
# Check if the correct number of arguments are provided
if [ "$#" -ne 2 ]; then
echo "Usage: $0 <alias_name> <alias_command>"
exit 1
fi
# Get the alias name and command from the arguments
ALIAS_NAME="$1"
@minuz
minuz / gist:2595ffe63441b532e56aa01fa79a4017
Created March 24, 2023 11:54
Setup-mobile-dev-mac.sh
#!/bin/bash
# Check for Homebrew and install if not found
if test ! $(which brew); then
echo "Installing Homebrew..."
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
else
echo "Updating Homebrew..."
brew update && brew upgrade
fi
@minuz
minuz / clean-beta-tags.sh
Created February 7, 2023 22:40
Clean up git tags
#!/bin/bash
tags=$(git tag -l "*-beta*")
if [ -z "$tags" ]; then
echo "No beta tags found"
exit 0
fi
# Delete all local git tags with the pattern -beta
@minuz
minuz / sassconvert.cmd
Created December 10, 2019 00:39
How to convert sass to scss
sass-convert -R ./ -F sass -T scss && find . -type f -name '*.sass' -delete