Skip to content

Instantly share code, notes, and snippets.

View ninjaprox's full-sized avatar

Vinh Nguyen ninjaprox

View GitHub Profile
@ninjaprox
ninjaprox / bump-version.sh
Created February 26, 2017 10:41
Bump version in Info.plist
#!/bin/bash
component=$1
version=$(/usr/libexec/PlistBuddy -c 'Print CFBundleShortVersionString' Info.plist)
IFS="." read major minor patch <<< "$version"
echo "$version"
if [[ "$component" = 'major' ]]; then
@ninjaprox
ninjaprox / ViewTransformation.swift
Last active January 12, 2025 19:39
Understanding UIView's tranform property
//: Playground - noun: a place where people can play
import UIKit
import XCPlayground
// MARK: - Helpers
extension UIView {
func addBorderWith(color: UIColor, width: CGFloat, alpha: CGFloat = 1) {
self.layer.borderColor = color.colorWithAlphaComponent(alpha).CGColor