Skip to content

Instantly share code, notes, and snippets.

@rbrovko
rbrovko / xcode-build-bump.sh
Created November 8, 2016 12: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)
@rbrovko
rbrovko / sketch-never-ending.md
Created October 6, 2017 11:10 — forked from Bhavdip/sketch-never-ending.md
Modify Sketch to never ending trial

###Sketch trial non stop

Open hosts files:

$ open /private/etc/hosts

Edit the file adding:

127.0.0.1 backend.bohemiancoding.com

127.0.0.1 bohemiancoding.sketch.analytics.s3-website-us-east-1.amazonaws.com

@rbrovko
rbrovko / DataReader.java
Created November 28, 2017 16:01 — forked from aarnchng/DataReader.java
DataReader.java - Convert Byte Array To Integer/Long/Float/Double
package references;
import java.io.IOException;
import java.io.InputStream;
import android.util.Log;
abstract class DataReader {
public static final int INVALID_DATA = -1;
@rbrovko
rbrovko / iOSDevices
Created February 7, 2018 09:36 — forked from erkanyildiz/iOSDevices
List of iOS devices with names and cpu models
{
"iPhone1,1":
{
"name": "iPhone",
"cpu": "RISC ARM 11"
},
"iPhone1,2":
{
"name": "iPhone 3G",
@rbrovko
rbrovko / set_agv_ver.sh
Created May 29, 2018 13:13 — forked from rob-murray/set_agv_ver.sh
Use agvtool to set Xcode project build number
#!/bin/bash
#
# Use agvtool to set Xcode project build number and create git tag
# Note: requires Xcode project configured to use Apple Generic Versioning and git
#
# Usage: set_agv_ver.sh 123
#
# src: https://gist.github.com/rob-murray/8644974
#
@rbrovko
rbrovko / LetTheCoWGo.swift
Created February 8, 2019 13:21 — forked from drewmccormack/LetTheCoWGo.swift
Demonstrates how a Swift value constant can mutate when using Copy-on-Write (CoW) and multi-threading.
import Foundation
struct NuclearPowerStationOperator {
class Storage {
var turnOffCores: Bool = false
func copy() -> Storage {
let new = Storage()
new.turnOffCores = turnOffCores
return new
@rbrovko
rbrovko / xcode-swift-vers
Created December 27, 2019 13:57 — forked from yamaya/xcode-swift-vers
Xcode swift version record
# Xcode 6.2 (6C131e)
Swift version 1.1 (swift-600.0.57.4)
Target: x86_64-apple-darwin14.1.0
# Xcode 6.3 (6D570)
Apple Swift version 1.2 (swiftlang-602.0.49.3 clang-clang-602.0.49)
Target: x86_64-apple-darwin14.1.0
# Xcode 6.3.1 (6D1002)
Apple Swift version 1.2 (swiftlang-602.0.49.6 clang-602.0.49)
@rbrovko
rbrovko / Display.swift
Created January 24, 2020 15:48 — forked from hfossli/Display.swift
Display mode
import UIKit
public enum DisplayType {
case unknown
case iphone4
case iphone5
case iphone6
case iphone6plus
static let iphone7 = iphone6
static let iphone7plus = iphone6plus