Skip to content

Instantly share code, notes, and snippets.

View florianbuerger's full-sized avatar
🐳
🏃‍♂️💨 🧗‍♂️👨‍💻🔁

Florian Bürger florianbuerger

🐳
🏃‍♂️💨 🧗‍♂️👨‍💻🔁
View GitHub Profile
public struct CodableColor: Codable {
public var red: CGFloat = 0
public var green: CGFloat = 0
public var blue: CGFloat = 0
public var alpha: CGFloat = 1.0
public var colorSpace: String
init(cgColor color: CGColor) {
let comps = color.components!
red = comps[0]
@florianbuerger
florianbuerger / gist:c62d4aa7f216d9f55f9e67b67bdee8f0
Last active March 6, 2019 10:27
Target all simulators (Fish)
for sim in (xcrun simctl list devices | grep "(Booted)" | grep -E -o -i "([0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12})")
	xcrun simctl <command> $sim
end
@florianbuerger
florianbuerger / gist:a465fd9072c5b8c08fbaabe0ea98bdb6
Created July 24, 2018 19:05
Enable status bar style for UIViewController inside of UINavigationController
extension UINavigationController {
open override var childViewControllerForStatusBarStyle: UIViewController? {
return topViewController
}
}

Keybase proof

I hereby claim:

  • I am florianbuerger on github.
  • I am florianbuerger (https://keybase.io/florianbuerger) on keybase.
  • I have a public key whose fingerprint is ED37 A9C3 8BB8 9E5E 85C8 5262 B25A 831B 48E6 3F10

To claim this, I am signing this object:

@florianbuerger
florianbuerger / image.py
Last active December 11, 2015 22:49 — forked from phughes/image.py
import os.path as path
import string
import argparse
import glob
import re
def basename(filename):
base = filename
if filename.find('@2x') > 0:
base = filename[:filename.find('@2x')]
# Your init script
#
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
#
# An example hack to log to the console when each text editor is saved.
#
# atom.workspace.observeTextEditors (editor) ->
# editor.onDidSave ->
@florianbuerger
florianbuerger / Breakpoints_v2.xcbkptlist
Last active August 29, 2015 14:22
Detect synchronous network calls on the main thread with a breakpoint. Thanks to Cédric Luthi (https://twitter.com/0xced/status/421285255086346240)
<?xml version="1.0" encoding="UTF-8"?>
<Bucket
type = "4"
version = "2.0">
<Breakpoints>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.SymbolicBreakpoint">
<BreakpointContent
shouldBeEnabled = "Yes"
ignoreCount = "0"
@florianbuerger
florianbuerger / gist:c08bd42b91b6c231c870
Created December 12, 2014 12:24
Is there a better way to create a UITableView.footerView where you don’t know the height when you create it?
let footer = TableFooterView(frame: CGRectZero)
footer.addButtonWithTitle("Red", backgroundColor: UIColor.redColor(), target: self, action: "redWasPressed:" as Selector)
footer.addButtonWithTitle("Green", backgroundColor: UIColor.greenColor(), target: self, action: "greenWasPressed:" as Selector)
footer.addButtonWithTitle("Blue", backgroundColor: UIColor.blueColor(), target: self, action: "blueWasPressed:" as Selector)
footer.updateConstraintsIfNeeded()
footer.layoutIfNeeded()
footer.frame = CGRectMake(0, 0, footer.intrinsicContentSize().width, footer.intrinsicContentSize().height)
tableView.tableFooterView = footer
curl https://developer.apple.com/videos/wwdc/2014/ | grep -iIoh 'http.*._hd_.*dl=1">HD' | sed -e 's/\?dl=1">HD//g' | xargs -n1 wget -N

Software should be user friendly

What does usability even mean? It must work effective, efficient and satisfying.

Software should do one thing only and one thing well.

What is the use if the Application can do many things but nobody understands how results are achieved? The Application should do only one thing tailored to the specific need. Communication between Software and humans should be as simple as possible.

Software should be ergonomically