Skip to content

Instantly share code, notes, and snippets.

View joshdholtz's full-sized avatar
👨‍👩‍👦
Family first then OSS

Josh Holtz joshdholtz

👨‍👩‍👦
Family first then OSS
View GitHub Profile
@joshdholtz
joshdholtz / 💣_service_workers.js
Created January 31, 2020 13:57
When Twitter fails to refresh, you run 💣_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) {
registration.unregister()
} })
@joshdholtz
joshdholtz / Fastfile
Created May 29, 2019 03:03
Restart Fastlane::BuildWatcher and call Pilot::BuildManager.new.distribute
# fastlane watch_and_dist
# or
# fastlane watch_and_dist username:"your@email.com" 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]
ENV['FASTLANE_ITC_TEAM_NAME'] ||= ENV['FASTLANE_TEAM_NAME'] = options[:team_name]
# Prompt for needed app/build info
app_identifier = options[:app_identifier] || UI.input("App Identifier")
@joshdholtz
joshdholtz / Fastfile
Last active March 1, 2021 23:29
Execute fastlane for multiple schemes based off of ".env.scheme_" dotenv files
# 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 }
next
@joshdholtz
joshdholtz / Fastfile
Created September 20, 2017 17:15
Add/configure new entitlements to project
def ios_add_push_entitlements(project_path)
entitlements_template_name = "app-template.entitlements"
entitlements_template_path = File.absolute_path entitlements_template_name
entitlements_template = File.read(entitlements_template_path)
# Replacing entitlement template with debug info
debug_file_name = "app-debug.entitlements"
debug_file = File.new(, "w")
debug_file.puts entitlements_template
.gsub("REPLACE_ENVIRONMENT", "debug")
@joshdholtz
joshdholtz / keymap_josh.c
Created September 14, 2017 16:45
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"
# Get provisioning profile and write to xcconfig for use with gym
profile_uuid = sigh(
app_identifier: bundle_identifier,
adhoc: is_ad_hoc
)
profile_config_path = File.absolute_path(File.join(path, "./CustomConfig.xcconfig"))
profile_config_content = "PROVISIONING_PROFILE_SPECIFIER = #{profile_uuid}
PRODUCT_BUNDLE_IDENTIFIER = #{bundle_identifier}
DEVELOPMENT_TEAM = #{ENV['DELIVER_TEAM_ID']}"
@joshdholtz
joshdholtz / .env
Last active December 26, 2023 13:31
Using Dotenv and environment variables with fastlane
STUFF = this is some stuff
@joshdholtz
joshdholtz / .env
Last active November 1, 2020 10:20
Integrate fastlane into your Ionic/Cordova build process
FASTLANE_TEAM_ID = <your team id>
FASTLANE_USER = <your user email>
PRODUCE_APP_IDENTIFIER = com.fastlanescreencast.FastlaneScreencast
CERT_APP_IDENTIFIER = com.fastlanescreencast.FastlaneScreencast
SIGH_APP_IDENTIFIER = com.fastlanescreencast.FastlaneScreencast
ANDROID_KEYSTORE_KEYSTORE_NAME = FastlaneScreencast.keystore
ANDROID_KEYSTORE_ALIAS_NAME = fastlanescreencast
ANDROID_KEYSTORE_PASSWORD = supersecret

Keybase proof

I hereby claim:

  • I am joshdholtz on github.
  • I am joshdholtz (https://keybase.io/joshdholtz) on keybase.
  • I have a public key ASDSc6Oy31AQQMq1Fvzx1MJZhYbTN_2WRGDLZ9M5VHXFnwo

To claim this, I am signing this object:

@joshdholtz
joshdholtz / homebrew.mxcl.jenkins.plist
Created October 12, 2016 23:07
jenkins launch daemon configuration
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>homebrew.mxcl.jenkins</string>
<key>ProgramArguments</key>
<array>
<string>/usr/bin/java</string>
<string>-Dmail.smtp.starttls.enable=true</string>