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
import Foundation | |
func easter(for year: Int) -> Date? { | |
// Code from Gist: https://gist.github.com/duedal/2eabcede718c69670102 | |
let a = year % 19 | |
let b = Int(floor(Double(year) / 100)) | |
let c = year % 100 | |
let d = Int(floor(Double(b) / 4)) | |
let e = b % 4 | |
let f = Int(floor(Double(b+8) / 25)) |
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
import UIKit | |
extension UIImage { | |
func tinted(withColor color: UIColor) -> UIImage? { | |
UIGraphicsBeginImageContextWithOptions(size, false, 0) | |
defer { UIGraphicsEndImageContext() } | |
let rect = CGRect(origin: .zero, size: size) | |
// Tint the image | |
self.draw(in: rect) |
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/env python3 | |
# Copyright 2017 Google Inc. | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software |
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
<?php | |
use bunq\Context\ApiContext; | |
use bunq\Model\Generated\Endpoint\User; | |
use bunq\Model\Generated\Endpoint\UserCompany; | |
use bunq\Model\Generated\Endpoint\UserPerson; | |
use bunq\Model\Generated\Object\NotificationFilter; | |
require 'vendor/autoload.php'; |
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
# diff | |
# version | |
# BetaFlight/OMNIBUS 3.0.1 Oct 18 2016 / 10:21:07 (48b7b4f) | |
# name | |
# mixer | |
# servo |
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
CLI | |
# diff | |
# Betaflight / OMNIBUS 3.1.6 Mar 6 2017 / 22:16:32 (1fd502c3) | |
name Bertcopter | |
feature -RX_PPM | |
feature -CURRENT_METER | |
feature -OSD | |
feature RX_SERIAL |
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 UIKit | |
import PlaygroundSupport | |
enum State<T, U> { | |
case empty | |
case loading | |
case content(T) | |
case error(U) |
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
# dump | |
# Betaflight / OMNIBUS 3.1.5 Feb 7 2017 / 22:19:42 (4646f9d) | |
name bertcopter | |
resource BEEPER 1 C15 | |
resource MOTOR 1 B08 | |
resource MOTOR 2 B09 | |
resource MOTOR 3 A03 | |
resource MOTOR 4 A02 | |
resource MOTOR 5 B07 | |
resource MOTOR 6 B06 |
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
#!/bin/sh | |
# Write git sha to info plist | |
set -o errexit | |
set -o nounset | |
GITSWIFTFILE="$SRCROOT/MyApp/Resources/Git.generated.swift" | |
GIT_SHA=$(git rev-parse --verify HEAD | cut -c 1-7) |
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
# dump | |
# version | |
# Cleanflight/SPRACINGF3EVO 1.13.0 Jun 6 2016 / 00:03:29 (a77bc76) | |
# dump master | |
# mixer | |
mixer QUADX | |
mmix reset | |
smix reset |