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 / ATinySampleApp.swift
Last active March 29, 2024 23:27
Super basic SwiftUI app (70 lines of code) with paywall using RevenueCat
import SwiftUI
import RevenueCat
struct Constants {
static let apiKey = "<your_api_key>" // Will look like: appl_bunchofotherstuffhere
static let entitlementName = "<your_entitlement_name>" // I use something like "pro"
}
@main
struct ATinySampleApp: App {
@joshdholtz
joshdholtz / .zshrc
Created October 27, 2021 19:16
Josh's M1 Mac Development Environment - homebrew, zsh
# ~/.zshrc
ZSH_DISABLE_COMPFIX=true
export ZSH="/Users/joshholtz/.oh-my-zsh"
# joshdholtz theme shows arch type in the prompt
ZSH_THEME="joshdholtz"
plugins=(git)
source $ZSH/oh-my-zsh.sh
# M1 and Rosetta
@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
Created March 4, 2015 01:26
Fastlane with different brands
# General ENV stuff used for all environments (brands)
WORKSPACE=YouApp.xcworkspace
@joshdholtz
joshdholtz / Gemfile
Last active July 7, 2023 20:23
Update LaMetric with RevenueCat Developer API and GitHub Actions
source "https://rubygems.org"
gem "json"
@joshdholtz
joshdholtz / Indie Dev Monday.js
Created May 9, 2021 01:13
Official Indie Dev Monday Widget For Scriptable
/*
* This is the offical Scriptable widget for Indie Dev Monday
*
* Indie Dev Monday (https://indiedevmonday.com) is a weekly newsletter
* spotlighting indie developers
*
* This script includes:
*
* Latest issue widget (no parameter)
* - shows latest issue
@joshdholtz
joshdholtz / SomeFragment.java
Last active December 22, 2022 09:41
Android Google Maps V2 - MapView in XML
public class SomeFragment extends Fragment {
MapView mapView;
GoogleMap map;
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View v = inflater.inflate(R.layout.some_layout, container, false);
@joshdholtz
joshdholtz / StopJumpingTableViewOnInsertRows.swift
Last active August 22, 2022 07:08
Used when loading more data into UITableView for a smooth "infinite scroll" feel
// I dont want my table jumping/animation when appending new rows
// for an infinite scroll feel
//
// Some of this might not be needed but it works
//
// TODO: Possibly garbage
extension UITableView {
func reloadDataSmoothly() {
UIView.setAnimationsEnabled(false)
@joshdholtz
joshdholtz / .env.secret.SAMPLE
Created April 1, 2022 03:04
Fastfile for building and updating for Sparkle
# GitHub
FL_GITHUB_API_TOKEN=
FL_GITHUB_RELEASE_API_TOKEN=
APP_STORE_CONNECT_API_KEY_ISSUER_ID=
APP_STORE_CONNECT_API_KEY_KEY_ID=
APP_STORE_CONNECT_API_KEY_KEY_FILEPATH=fastlane/YOUR.p8
FL_NOTARIZE_BUNDLE_ID=
FL_NOTARIZE_ASC_PROVIDER=
@joshdholtz
joshdholtz / Fastfile
Created July 31, 2021 15:13
Fastfile - build, manage provisioning and version/build numbers, and upload to App Store Connect
lane :build_and_upload do
# Build by allowing provisioning updates, auto version and build number management,
# and uploading directly to App Store Connect
#
# Requires: signed in with Apple ID in Xcode
# Radar for using App Store Connect API Key: FB9145847
gym(
xcargs: "-allowProvisioningUpdates",
export_options: {
"destination": "upload",