Skip to content

Instantly share code, notes, and snippets.

polok / xcodebuild build-for-testing
Created Feb 9, 2022
[TERMINAL] xcodebuild build-for-testing
View xcodebuild build-for-testing
xcodebuild \
build-for-testing \
-workspace XXX.xcworkspace \
-scheme XXX_SCHEME \
-destination 'platform=iOS Simulator,name=iPhone 11' \
-derivedDataPath ./build/iOS/
polok / bash
Created Jul 22, 2019
[Git] Empty commit
View bash
$ git commit --allow-empty -m "Empty message"
polok / brew_switch_swiftformat
Last active Jul 15, 2019
Swiftformat version switch using brew
View brew_switch_swiftformat
brew switch swiftformat XXX
Before above check that you have requested swiftformat version. In my case it was here:
brew switch swiftformat 0.37.5
polok / file.swift
Created Jan 12, 2017
Small function to rotate the image clockwise or counterclockwise
View file.swift
func rotate(image: UIImage, clockwise: Bool) -> UIImage {
var rotatedImage: UIImage?
let rotateSize = CGSize(width: image.size.height, height: image.size.width)
UIGraphicsBeginImageContextWithOptions(rotateSize, false, 1.0)
guard let context = UIGraphicsGetCurrentContext() else {
return image
polok / shadow.xml
Last active Nov 15, 2016
[Android] Elevation on Pre-lollipop Devices
View shadow.xml
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android=""