Skip to content

Instantly share code, notes, and snippets.

Working on @fastlane 💪

Josh Holtz joshdholtz

Working on @fastlane 💪
View GitHub Profile
joshdholtz / Fastfile
Last active Oct 20, 2020
Check if fastlane is building in Xcode run script
View Fastfile
lane :build do
xcargs: "FASTLANE=true"
joshdholtz / Fastfile
Created May 28, 2020
fastlane - Get TestFlight Feedback
View Fastfile
lane :connect_feedback do
fastlane_require 'spaceship'
# Gets app
app = Spaceship::ConnectAPI::App.find(ENV["TEST_APP_BUNDLE"])
# Gets feedback for an app (default includes screenshots and tester info)
View Release.xcconfig
Z_IS_IOS[sdk=iphoneos*] = YES
joshdholtz / userLatestStatus.graphql
Last active Mar 26, 2020
graphql - get all users (order by email) with only the newest status
View userLatestStatus.graphql
query UserLatestStatus {
users(order_by: {email: asc}) {
statuses(limit: 1, order_by: {created_at: desc}) {
joshdholtz / .zshrc
Last active Nov 10, 2020
gh pr push <pr_number>
View .zshrc
# Pushes to the remote that the PR was created from
# Useful for open source projects that allows maintainers to edit
# Requires "brew install jq"
# Requires "brew install github/gh/gh"
function pr_push {
ORG_AND_REPO=$(git remote get-url origin | sed 's/.*\/\([^ ]*\/[^.]*\).*/\1/')
REMOTE_URL=$(curl$ORG_AND_REPO/pulls/${1:?"The PR number must be specified"} | jq .head.repo.clone_url | tr -d '"')
BRANCH=$(git rev-parse --abbrev-ref HEAD)
joshdholtz / 💣_service_workers.js
Created Jan 31, 2020
When Twitter fails to refresh, you run 💣_service_workers.js
View 💣_service_workers.js
// Once a weeek (or so) I won't be able to reload anything on Twitter (web)
// There page reload gets stuck at about 30%
// Twitter works in private browser instances and other browsers
// There is some issue in the service worker that is preventing a refresh
// The only solution is to run this in the open up the Javascript Console and run this
navigator.serviceWorker.getRegistrations().then(function(registrations) {
for(let registration of registrations) {
} })
joshdholtz / Fastfile
Created May 29, 2019
Restart Fastlane::BuildWatcher and call
View Fastfile
# fastlane watch_and_dist
# or
# fastlane watch_and_dist username:"" team_name:"Team Name" app_identifier:"com.your_app" version:"1.1" build_number:"239" groups:"Group1,Group2"
lane :watch_and_dist do |options|
# Set ENVs for Spaceship and Pilot
ENV['FASTLANE_USER'] ||= options[:username]
# Prompt for needed app/build info
app_identifier = options[:app_identifier] || UI.input("App Identifier")
joshdholtz / Fastfile
Last active Dec 30, 2018
Execute fastlane for multiple schemes based off of ".env.scheme_" dotenv files
View Fastfile
# fastlane do_task
# fastlane do_task envs:"scheme_1,scheme_2"
lane :do_task do |options|
# Execute this lane for all schemes if no
# 'SCHEME` environment variable
if ENV['SCHEME'] == nil
envs = options[:envs].to_s.split(",")
execute_for_all_scheme_envs(envs) { do_task }
joshdholtz / Fastfile
Created Sep 20, 2017
Add/configure new entitlements to project
View Fastfile
def ios_add_push_entitlements(project_path)
entitlements_template_name = "app-template.entitlements"
entitlements_template_path = File.absolute_path entitlements_template_name
entitlements_template =
# Replacing entitlement template with debug info
debug_file_name = "app-debug.entitlements"
debug_file =, "w")
debug_file.puts entitlements_template
.gsub("REPLACE_ENVIRONMENT", "debug")
View keymap_josh.c
// Differences from defaults
// 1. Tab instead of backspace on left hand
// 2. Control was taken off of Z
// 3. LGui (CMD/Windows) on bottom left left hand
// 4. AlfShf replaced with Alt on left hand (for hots)
#include "ergodox_ez.h"
#include "debug.h"
#include "action_layer.h"
You can’t perform that action at this time.