Skip to content

Instantly share code, notes, and snippets.

View bkobilansky's full-sized avatar

Brandon Kobilansky bkobilansky

View GitHub Profile
@bkobilansky
bkobilansky / Theming-Slack-OSX.md
Created November 8, 2018 18:47 — forked from DrewML/Theming-Slack-OSX.md
Theming Slack for OSX

Theming Slack for OSX

So, you love Slack, but you hate applications with large white backgrounds? Why not use Dark Mode!

Unfortunately, Slack does not have a Dark Mode, although it's on their list of possibilities.

But, don't fret - there is a solution! Because the slack native desktop apps are just wrappers around a web app, we can inject our own CSS to customize the application to our liking.

How to (OSX Only)

@bkobilansky
bkobilansky / empty-block-param-list.m
Last active February 27, 2017 05:40
Objective-C blocks empty param list is not void
#import <Foundation/Foundation.h>
int main(int argc, const char * argv[]) {
@autoreleasepool {
// note that an empty list here doesn't mean "no params"
void (^printNSArray)();
printNSArray = ^(NSArray *items) {
// deliberately safe to prove a point
@bkobilansky
bkobilansky / AssertThrowsError.swift
Created February 19, 2017 19:19 — forked from JohnSundell/AssertThrowsError.swift
A function that asserts that an expression throws a given error
/**
* Copyright (c) John Sundell 2017
* Licensed under the MIT license
*/
import Foundation
import XCTest
/**
* Assert that an expression throws a given error

What I Wish I'd Known About Equity Before Joining A Unicorn

Disclaimer: This piece is written anonymously. The names of a few particular companies are mentioned, but as common examples only.

This is a short write-up on things that I wish I'd known and considered before joining a private company (aka startup, aka unicorn in some cases). I'm not trying to make the case that you should never join a private company, but the power imbalance between founder and employee is extreme, and that potential candidates would

@bkobilansky
bkobilansky / SpinlockTestTests.swift
Created December 9, 2016 07:00 — forked from steipete/SpinlockTestTests.swift
Updated for Xcode 8, Swift 3; added os_unfair_lock
//
// SpinlockTestTests.swift
// SpinlockTestTests
//
// Created by Peter Steinberger on 04/10/2016.
// Copyright © 2016 PSPDFKit GmbH. All rights reserved.
//
import XCTest
@bkobilansky
bkobilansky / TypeErasure.swift
Created September 9, 2016 00:58 — forked from russbishop/TypeErasure.swift
Type erasure with multiple adopting types
// Paste me into a playground!
import Cocoa
//: # Basic Setup
protocol FancyProtocol {
associatedtype Thing
func holdPinkyUp(x: Thing)
}
@bkobilansky
bkobilansky / Crash.log
Created April 29, 2016 21:22 — forked from bjtitus/Crash.log
Swift Profile Coverage Mapping Ternary Compiler Crashes
0 swift 0x0000000105bbc33b llvm::sys::PrintStackTrace(__sFILE*) + 43
1 swift 0x0000000105bbca7b SignalHandler(int) + 379
2 libsystem_platform.dylib 0x00007fff8b24052a _sigtramp + 26
3 libc++.1.dylib 0x00007fff8f4d93c6 std::__1::num_put<char, std::__1::ostreambuf_iterator<char, std::__1::char_traits<char> > >::do_put(std::__1::ostreambuf_iterator<char, std::__1::char_traits<char> >, std::__1::ios_base&, char, unsigned long) const + 0
4 swift 0x00000001042f05da swift::Expr::walk(swift::ASTWalker&) + 26
5 swift 0x0000000103ec7951 walkForProfiling(swift::AbstractFunctionDecl*, swift::ASTWalker&) + 225
6 swift 0x0000000103ec732d swift::Lowering::SILGenProfiling::assignRegionCounters(swift::AbstractFunctionDecl*) + 573
7 swift 0x0000000103ed265d (anonymous namespace)::SILGenType::emitType() + 701
8 swift 0x0000000103ed232e swift::Lowering::SILGenModule::visitNominal