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
Last active February 9, 2026 00:27
Basic setup for development on mac
#!/usr/bin/env zsh
set -e
# Helper function to check if a Homebrew package is installed
is_brew_installed() {
brew list "$1" >/dev/null 2>&1
}
echo "==> Checking Xcode Command Line Tools"
xcode-select -p >/dev/null 2>&1 || xcode-select --install
@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