variable "env" {
description = "Environment"
default = "dev"
}
variable "app_name" {
description = "Application name"
I hereby claim:
- I am portellaa on github.
- I am portellaa (https://keybase.io/portellaa) on keybase.
- I have a public key ASDWp0iRsyw7s9yzpqYrJZtf7YbTbLikuKDfDw_HnSF88wo
To claim this, I am signing this object:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func timeToDoItCorrectly() { | |
let generator = TimeBasedFibonacciGenerator() | |
// You have this both, feel free to use the one suits you best 🤔 | |
// let signal = generator.signal | |
let producer = generator.producer | |
let result = producer | |
.take(first: N) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//: Playground - noun: a place where people can play | |
import Foundation | |
typealias LazyServiceClosure<Service> = () -> (Service) | |
enum ServiceLocatorError: Error { | |
case duplicateService(String) | |
case inexistentService | |
case serviceTypeMismatch |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extension DateFormatter { | |
private enum DateFormatters { | |
static var yearMonthDayFormat: String = "yyyy%@MM%@dd" | |
static var dayMonthYearFormat: String = "dd%@MM%@yyyy" | |
static var chatDateFormat: String = "EEEE d'%@' MMMM" | |
static var yearMonthDayFormatters: [Separator : DateFormatter] = [:] | |
static var dayMonthYearFormatters: [Separator : DateFormatter] = [:] | |
static var dateFormatters: [String : DateFormatter] = [:] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
protocol TableViewHeaderProtocol: ViewCellReuseIdentifier { | |
init() | |
func setupLayout() | |
} | |
extension TableViewHeaderProtocol where Self: UITableViewHeaderFooterView { | |
init() { | |
self.init(reuseIdentifier: Self.reuseIdentifier) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
xcrun simctl list devices | egrep -o '([A-F0-9]+-){4}[A-F0-9]+' | xargs -I 📱 xcrun simctl delete 📱 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
[ | |
{ "keys": ["super+0"], "command": "toggle_side_bar" }, | |
{ "keys": ["super+shift+o"], "command": "show_overlay", "args": {"overlay": "goto", "show_files": true} }, | |
{ "keys": ["super+shift+y"], "command": "show_panel", "args": {"panel": "console", "toggle": true} }, | |
{ | |
"keys": ["super+enter"], | |
"command": "set_layout", | |
"args": | |
{ | |
"cols": [0.0, 1.0], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/ruby | |
# Create display override file to force Mac OS X to use RGB mode for Display | |
# see http://embdev.net/topic/284710 | |
require 'base64' | |
data=`ioreg -l -d0 -w 0 -r -c AppleDisplay` | |
edids=data.scan(/IODisplayEDID.*?<([a-z0-9]+)>/i).flatten | |
vendorids=data.scan(/DisplayVendorID.*?([0-9]+)/i).flatten |
This gist outlines how to resize a view when a keyboard appears using Auto Layout (there are a bunch of code samples out there that manually adjust the view's frame, but that's just so 2013). The method I outline below works universally on both iPhone and iPad, portrait and landscape, and is pretty darn simple.
The first thing to do is to define our containing view controller, the view, and the bottom constraint that we'll use to adjust its size.
Here's HeightAdjustingViewController.h. We don't need to expose any public properties, so it's pretty bare.