Skip to content

Instantly share code, notes, and snippets.

View carlocab's full-sized avatar

Carlo Cabrera carlocab

View GitHub Profile
@carlocab
carlocab / emscripten-revisions.sh
Last active September 17, 2024 10:36
Emscipten Homebrew Formula Update Helper Script
#!/usr/bin/env bash
# Helper script for fetching the required Binaryen and LLVM revisions for the current release of Emscripten in Homebrew/core.
# TODO:
# - print output in a machine-readable format (e.g. JSON)
# - remove dependency on `rg`
# - automate updating `emscripten.rb`
REQUIRED_COMMANDS=(jq curl brew base64 rg python3)
for prog in "${REQUIRED_COMMANDS[@]}"; do
if ! command -v "${prog}" &>/dev/null; then
@carlocab
carlocab / resolve-comments.rb
Last active September 13, 2024 05:49
Helper Script for Homebrew Mass Bottling Tracking Issue
#!/usr/bin/env brew ruby
# Marks a comment in the tracking issue as resolved if it is about a formula that is already bottled.
ISSUE = 184132
bottle_tag = Utils::Bottles::Tag.new(arch: :arm64, system: :sequoia)
MINIMIZE_COMMENT_MUTATION = <<~GRAPHQL
mutation ($input: MinimizeCommentInput!) {
minimizeComment(input: $input) {
clientMutationId
@carlocab
carlocab / rebase_failures.sh
Created August 25, 2022 17:00
Rebase failing PRs.
#!/bin/bash
LIMIT=250
CLOSE_MESSAGE="please reopen against master"
failed_prs="$(gh pr list --limit $LIMIT --search 'status:failure' | cut -f1)"
git fetch origin
for pr in $failed_prs
do
@carlocab
carlocab / # luvit - 2021-01-20_11-45-46.txt
Created January 20, 2021 11:50
luvit on macOS 11 - Homebrew build logs
Homebrew build logs for luvit on macOS 11
Build date: 2021-01-20 11:45:46
@carlocab
carlocab / # llvm - 2020-12-17_15-30-01.txt
Created December 17, 2020 16:01
llvm on macOS 11.1 - Homebrew build logs
Homebrew build logs for llvm on macOS 11.1
Build date: 2020-12-17 15:30:01
@carlocab
carlocab / # gcc - 2020-12-17_14-57-30.txt
Created December 17, 2020 15:59
gcc on macOS 11.1 - Homebrew build logs
Homebrew build logs for gcc on macOS 11.1
Build date: 2020-12-17 14:57:30