Skip to content

Instantly share code, notes, and snippets.

@slycrel
slycrel / SwiftNetworking.swift
Created August 30, 2017 06:48
Simple Swift REST Networking Layer
// Copyright © 2016 Jeremy Stone, released under the MIT license.
import UIKit
import Foundation
// Some keychain code relies on Sam Soffes' fantastic keychain library. https://github.com/soffes/SAMKeychain
// For this gist, that code is stubbed to do nothing.
class SAMKeychain {
static func password(forService:String, account:String) -> String? { return nil }
static func deletePassword(forService:String, account:String) { }
static func setPassword(_ password:String, forService:String, account:String) { }
@slycrel
slycrel / git_versioning.sh
Created August 30, 2017 16:06
git versioning script for XCode
# ---------------------------- IMPORTANT ----------------------------
# You must set GITHash to something like 'Set by build script' in the file
# file '<Project Name>-Info.plist' in the 'Supporting Files' group
# -------------------------------------------------------------------
#
# Get the version number from the tag in git and the number of commits as the build number
#
appVersion=$(git describe --tags --abbrev=0)
appBuild=$(git rev-list HEAD --count)
gitHash=$(git rev-parse --short HEAD)
@slycrel
slycrel / mantle_strip.sh
Created August 30, 2017 16:16
Remove unused architectures from framework code.
if [ "${CONFIGURATION}" = "Release" ]; then
APP_PATH="${TARGET_BUILD_DIR}/${WRAPPER_NAME}"
# This script loops through the frameworks embedded in the application and
# removes unused architectures.
find "$APP_PATH" -name '*.framework' -type d | while read -r FRAMEWORK
do
FRAMEWORK_EXECUTABLE_NAME=$(defaults read "$FRAMEWORK/Info.plist" CFBundleExecutable)

Stevey's Google Platforms Rant

I was at Amazon for about six and a half years, and now I've been at Google for that long. One thing that struck me immediately about the two companies -- an impression that has been reinforced almost daily -- is that Amazon does everything wrong, and Google does everything right. Sure, it's a sweeping generalization, but a surprisingly accurate one. It's pretty crazy. There are probably a hundred or even two hundred different ways you can compare the two companies, and Google is superior in all but three of them, if I recall correctly. I actually did a spreadsheet at one point but Legal wouldn't let me show it to anyone, even though recruiting loved it.

I mean, just to give you a very brief taste: Amazon's recruiting process is fundamentally flawed by having teams hire for themselves, so their hiring bar is incredibly inconsistent across teams, despite various efforts they've made to level it out. And their operations are a mess; they don't real