Skip to content

Instantly share code, notes, and snippets.

import UIKit
extension UIImage {
// colorize image with given tint color
// this is similar to Photoshop's "Color" layer blend mode
// this is perfect for non-greyscale source images, and images that have both highlights and shadows that should be preserved
// white will stay white and black will stay black as the lightness of the image is preserved
func tint(tintColor: UIColor) -> UIImage {
@ymauray
ymauray / xcode-build-bump.sh
Created August 18, 2017 18:29 — forked from sekati/xcode-build-bump.sh
Xcode Auto-increment Build & Version Numbers
# xcode-build-bump.sh
# @desc Auto-increment the build number every time the project is run.
# @usage
# 1. Select: your Target in Xcode
# 2. Select: Build Phases Tab
# 3. Select: Add Build Phase -> Add Run Script
# 4. Paste code below in to new "Run Script" section
# 5. Drag the "Run Script" below "Link Binaries With Libraries"
# 6. Insure that your starting build number is set to a whole integer and not a float (e.g. 1, not 1.0)
@ymauray
ymauray / streamdeck.sh
Last active December 16, 2021 09:17 — forked from flexiondotorg/streamdeck.sh
Install StreamDeck Unix on Ubuntu
#!/usr/bin/env bash
if [ "$(id -u)" -ne 0 ]; then
echo "ERROR! Must be root."
exit 1
fi
export GOPATH="/tmp/go"
if [ -d "${GOPATH}" ]; then
rm -rf "${GOPATH}"