Skip to content

Instantly share code, notes, and snippets.

joeblau / SegmentPagesView.swift
Created Sep 21, 2021
Segment Control + Pages
View SegmentPagesView.swift
// ContentView.swift
// SegPage
// Created by Joe Blau on 9/21/21.
import SwiftUI
enum Page: Identifiable, CaseIterable, CustomStringConvertible {

Keybase proof

I hereby claim:

  • I am joeblau on github.
  • I am joeblau ( on keybase.
  • I have a public key ASD9LAhlVKLXdnWe8CI2LOLZbvXAuBjY8EQ0AtrbJidvbAo

To claim this, I am signing this object:

joeblau / pre-commit
Created Jun 1, 2019
Pre commit git hook to run SwiftLint and SwiftFormat
View pre-commit
# Place this file in `.git/hooks/`
if which swiftlint >/dev/null; then
swiftlint autocorrect
echo "warning: SwiftLint not installed, download from"
git diff --diff-filter=d --staged --name-only | grep -e '\(.*\).swift$' | while read line; do
joeblau / app.plist
Created May 28, 2019
Apple enterprise app distribution
View app.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "">
<plist version="1.0">

Animated Transition

  • VC asks transitioningDelegate “do you have an animated transition for me?”
  • delegate says “yes here is an <AnimatedTransitioning> object”
  • framework says “hey <AnimatedTransitioning> object; perform the transition, and here’s the <ContextTransitioning> that defines the container view, the from vc, the to vc, the frames, etc. tell the context when you’re done”
  • <AnimatedTransitioning> value does the animation and tells the <ContextTransitioning> value when it’s done
  • fin

Interactive Transition

  • VC asks transitioningDelegate “do you have an interactive transition for me?”
  • delegate says “yes, here is an <InteractiveTransitioning> and an <AnimatedTransitioning>
joeblau / simrecord
Created Mar 16, 2018 — forked from JohnSundell/simrecord
🎥 Script that lets you start a video recording from the iOS simulator with one command
View simrecord
FILENAME="$HOME/Desktop/Simulator Recording.$EXTENSION"
while [ -e "$FILENAME" ]
FILENAME="$HOME/Desktop/Simulator Recording $ITERATION.$EXTENSION"
joeblau / OSX Secure Disk
Last active Sep 16, 2021
Securely erase an external disk using dd on OSX
View OSX Secure Disk

Securely erase an external disk using dd on OSX

  1. Plug in your SD card, HDD, or other block device and then use the following command to see which /dev/diskN node it's located on:
diskutil list
  1. Unmount the disk where “N� is the number of the disk taken from the above command:
joeblau /
Created Mar 26, 2014
Patatap Sounds Download Script
array=( wipe veil prism-1 prism-2 prism-3 clay piston-1 piston-2 piston-3 flash-1 flash-2 flash-3 dotted-spiral suspension confetti timer ufo splits moon strike zig-zag squiggle bubbles corona pinwheel glimmer )
for i in "${array[@]}"
wget -nc "$i.mp3" -P A/
wget -nc "$i.mp3" -P B/
wget -nc "$i.mp3" -P C/
wget -nc "$i.mp3" -P D/
wget -nc "$i.mp3" -P E/
joeblau / git yolo
Created Feb 3, 2014
git yolo command
View git yolo
alias gityolo='git commit -am "DEAL WITH IT" && git push -f origin master'