Skip to content

Instantly share code, notes, and snippets.

View richellis's full-sized avatar

Rich Ellis richellis

  • Nike
  • Portland, Oregon, USA
View GitHub Profile
@steverichey
steverichey / Iconizer.sh
Last active February 23, 2022 17:40
Create iOS application icons from one PDF file. Requires ImageMagick.
#!/bin/sh
#
# Iconizer shell script by Steve Richey ([email protected])
#
# This is a simple tool to generate all necessary app icon sizes and the JSON file for an *EXISTING* Xcode project from one file.
# To use: specify the path to your vector graphic (PDF format) and the path to your Xcode folder containing Images.xcassets
# Example: sh iconizer.sh MyVectorGraphic.pdf MyXcodeProject
#
# Requires ImageMagick: http://www.imagemagick.org/
@danielcarr
danielcarr / pod-update-post-checkout
Last active September 16, 2022 12:38 — forked from kreeger/pod-install-post-checkout
A post-checkout hook for running pod install if necessary checking out a branch
#!/usr/bin/env sh
from_branch=$1
checked_out_branch=$2
check_out_type=$3 # changing branches = 1; checking out a file = 0
# If checking out a fresh clone
if test $from_branch = 0000000000000000000000000000000000000000 ; then
from_branch=`git hash-object -t tree /dev/null` # a hash representing an empty tree/repo
fi
@doroshenko
doroshenko / swiftlint.sh
Created February 22, 2020 22:50
An incremental linting script for SwiftLint
#!/bin/bash
START_DATE=$(date +"%s")
SWIFTLINT="${PODS_ROOT}/SwiftLint/swiftlint"
EXIT_CODE=0
# Usage description
function usage() {
if [ -n "$1" ]; then
@chockenberry
chockenberry / simkill.sh
Last active December 9, 2023 14:04
A simple shell script to reset CoreSimulator
#!/bin/sh
pids=`ps axo pid,command | grep CoreSimulator | grep -v "grep CoreSimulator" | cut -c 1-5`
if [ "$1" = "go" ]; then
kill -9 $pids
elif [ "$1" = "echo" ]; then
echo $pids
else
pid_param=`echo $pids | tr -s ' ' ','`