Skip to content

Instantly share code, notes, and snippets.

View bstillitano's full-sized avatar

Brandon Stillitano bstillitano

  • Sydney, NSW, Australia
View GitHub Profile
@bstillitano
bstillitano / AsyncGMSPlaceSearch.swift
Created January 8, 2024 00:36
Async/Await GMSPlace Search
import GooglePlaces
func getAddresses(withQuery query: String) async -> [GMSPlace]? {
let client = GMSPlacesClient.shared()
let token = GMSAutocompleteSessionToken.init()
let filter = GMSAutocompleteFilter()
let predictions: [GMSAutocompletePrediction]? = await withCheckedContinuation { continuation in
client.findAutocompletePredictions(
fromQuery: query, filter: filter, sessionToken: token,
callback: { (results, error) in
@bstillitano
bstillitano / move-git-tag
Last active February 26, 2021 04:21
Simple shell script that allows you to move a git tag without having to manually remove it. This script guides you through without requiring any knowledge of git.
#!/bin/bash
echo -e "Hi $(whoami) 👋, this script allows you to move an existing git tag to the latest commit on your current branch and then pushes it to the remote. Are you sure you want to proceed? [y/n]"
read proceedWithMove
if [ $proceedWithMove == y ] || [ $proceedWithMove == Y ]
then
echo -e "\n\nWhat directory is your git branch in? This script will cd in for you and use that as the working directory. This should be relative to the root folder of your machine. For example, if your repository is at ~/Users/Brandon/iOS then you should enter /Users/Brandon/iOS. If you're currently in the right folder, leave this blank."