Skip to content

Instantly share code, notes, and snippets.

@sketchytech
sketchytech / DragZoomPinch.swift
Last active October 17, 2024 17:48
Using Auto Layout Constraints for Drag, Pinch, Zoom and Tap
import UIKit
import PlaygroundSupport
class ViewController: UIViewController {
var redView:UIView!
var movedRight:Bool = false
var verticalConstraint:NSLayoutConstraint!
var horizontalConstraint:NSLayoutConstraint!
var widthConstraint:NSLayoutConstraint!
var heightConstraint:NSLayoutConstraint!
@mobilemind
mobilemind / git-tag-delete-local-and-remote.sh
Last active May 16, 2025 16:05
how to delete a git tag locally and remote
# delete local tag '12345'
git tag -d 12345
# delete remote tag '12345' (eg, GitHub version too)
git push origin :refs/tags/12345
# alternative approach
git push --delete origin tagName
git tag -d tagName
@mbinna
mbinna / podforceupdate.sh
Created December 4, 2012 09:43
Clear CocoaPods cache, re-download and re-install all pods
#!/usr/bin/env bash
rm -rf "${HOME}/Library/Caches/CocoaPods"
rm -rf "`pwd`/Pods/"
pod update
@adamawolf
adamawolf / Apple_mobile_device_types.txt
Last active May 17, 2025 08:47
List of Apple's mobile device codes types a.k.a. machine ids (e.g. `iPhone1,1`, `Watch1,1`, etc.) and their matching product names
i386 : iPhone Simulator
x86_64 : iPhone Simulator
arm64 : iPhone Simulator
iPhone1,1 : iPhone
iPhone1,2 : iPhone 3G
iPhone2,1 : iPhone 3GS
iPhone3,1 : iPhone 4
iPhone3,2 : iPhone 4 GSM Rev A
iPhone3,3 : iPhone 4 CDMA
iPhone4,1 : iPhone 4S