Skip to content

Instantly share code, notes, and snippets.

Joe Blau joeblau

Block or report user

Report or block joeblau

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@joeblau
joeblau / pre-commit
Created Jun 1, 2019
Pre commit git hook to run SwiftLint and SwiftFormat
View pre-commit
#!/bin/bash
# Place this file in `.git/hooks/`
if which swiftlint >/dev/null; then
swiftlint autocorrect
else
echo "warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint"
fi
git diff --diff-filter=d --staged --name-only | grep -e '\(.*\).swift$' | while read line; do
@joeblau
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" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>items</key>
<array>
<dict>
<key>assets</key>
<array>
<dict>
View transitoins.md

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
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
#!/bin/bash
ITERATION=1
EXTENSION="mp4"
FILENAME="$HOME/Desktop/Simulator Recording.$EXTENSION"
while [ -e "$FILENAME" ]
do
ITERATION=$((ITERATION+1))
FILENAME="$HOME/Desktop/Simulator Recording $ITERATION.$EXTENSION"
View AppleCodeLogo.md
                                    _.
                                _/=\:<
                              .#/*let}
                            //as\@#:~/
                           try()]:=./
                          *~let:>@{#
                          </>)#@~*/
                         (+~:~/+/
                         /={+"
@joeblau
joeblau / OSX Secure Disk Wipe.md
Last active Aug 20, 2019
Securely erase an external disk using dd on OSX
View OSX Secure Disk Wipe.md

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
joeblau / patatap.sh
Created Mar 26, 2014
Patatap Sounds Download Script
View patatap.sh
#!/bin/bash
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[@]}"
do
wget -nc "http://www.patatap.com/assets/A/$i.mp3" -P A/
wget -nc "http://www.patatap.com/assets/B/$i.mp3" -P B/
wget -nc "http://www.patatap.com/assets/C/$i.mp3" -P C/
wget -nc "http://www.patatap.com/assets/D/$i.mp3" -P D/
wget -nc "http://www.patatap.com/assets/E/$i.mp3" -P E/
@joeblau
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'
You can’t perform that action at this time.