Skip to content

Instantly share code, notes, and snippets.

@rsobik
rsobik / keybase.me
Last active January 25, 2020 10:05
### Keybase proof
I hereby claim:
* I am rsobik on github.
* I am rsobik (https://keybase.io/rsobik) on keybase.
* I have a public key ASB8rBVWQyEpob0q_1nJtfxaGuiB_CExthVS3oi9j4qIeAo
To claim this, I am signing this object:
import Foundation
var unmanagedTrust : Unmanaged<SecTrust>?
let status = SecTrustCreateWithCertificates(nil, nil, &unmanagedTrust)
let trust = unmanagedTrust!.takeUnretainedValue()
assert(SecTrustGetCertificateCount(trust) > 0)
let certificate = SecTrustGetCertificateAtIndex(trust, 0).takeUnretainedValue()
let serverCertData = SecCertificateCopyData(certificate).takeRetainedValue()
@rsobik
rsobik / boost.sh
Created November 17, 2013 13:20
Build Boost 1.55.0 for iOS 7 and OS X including 64 Bit
#===============================================================================
# Filename: boost.sh
# Author: Pete Goodliffe
# Copyright: (c) Copyright 2009 Pete Goodliffe
# Licence: Please feel free to use this, with attribution
# Modified version
#===============================================================================
#
# Builds a Boost framework for the iPhone.
# Creates a set of universal libraries that can be used on an iPhone and in the
@rsobik
rsobik / arduino.sublime-project
Created December 10, 2012 18:10
Sublime Text 2 Project File for Arduino and SublimeClang
{
"folders":
[
{
"path": "."
}
],
"settings":
{
"sublimeclang_options":
@rsobik
rsobik / update_bundle_version.sh
Last active October 12, 2015 16:27
Update CFBundleVersion
# Update the CFBundleVersion in the generated Info.plist using the count of all commits
# Use Xcode's copy of the Git binary
GIT=`xcrun -find git`
# Use the commit count as CFBundleVersion
GIT_COMMIT_COUNT=`${GIT} rev-list --all | wc -l | tr -d ' '`
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion ${GIT_COMMIT_COUNT}" "${BUILT_PRODUCTS_DIR}/${INFOPLIST_PATH}"
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion ${GIT_COMMIT_COUNT}" "${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}/Contents/Info.plist"
@rsobik
rsobik / update_bundle_short_version_string.sh
Created November 11, 2012 11:00
Update CFBundleShortVersionString String
# Use Xcode's copy of the Git binary
GIT=`xcrun -find git`
## Use the last annotated tag as CFBundleShortVersionString
GIT_TAG=`${GIT} describe --tags`
/usr/libexec/PlistBuddy -c "Set :CFBundleShortVersionString ${GIT_TAG}" "${BUILT_PRODUCTS_DIR}/${INFOPLIST_PATH}"