 { git tag $1; git push origin $1; }; f" | |
# removes all tags matching input on remote only. git removetags string_in_tag | |
removetags = "!f() { git tag -l | grep $1 | xargs git push --delete origin; echo 'Deleted tags remotely only. If all ok, do a cleantags to remove them locally as well or if NOK use pushtags to re-push them to remote'; }; f" | |
# push all local tags to server | |
pushtags = push origin --tags | |
# find the sha and branch(es) of a tag |
This file contains 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
// from Hector Matos speech Type Erasure Magic | |
//: https://realm.io/news/altconf-hector-matos-type-erasure-magic/ | |
import UIKit | |
public struct Transaction {} | |
protocol CellReloadable: class { | |
associatedtype DataType | |
var selectedIndexPath: NSIndexPath? { get set } |
This file contains 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
// http://blog.human-friendly.com/drawing-images-from-pixel-data-in-swift | |
// https://github.com/FlexMonkey/MetalReactionDiffusion/blob/1ea9aa4a841d20e0b247505fdf716cd5fe1a01fd/MetalReactionDiffusion/ViewController.swift | |
public struct PixelData { | |
var a:UInt8 = 255 | |
var r:UInt8 | |
var g:UInt8 | |
var b:UInt8 | |
} |
This file contains 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
//http://stackoverflow.com/questions/3741323/how-do-i-export-uiimage-array-as-a-movie/3742212#3742212 | |
import AVFoundation | |
import UIKit | |
import Photos | |
struct RenderSettings { | |
var width: CGFloat = 1334 | |
var height: CGFloat = 750 |
This file contains 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
//https://www.raywenderlich.com/94404/play-record-merge-videos-ios-swift | |
// MARK: - UIImagePickerControllerDelegate | |
extension PlayVideoViewController: UIImagePickerControllerDelegate { | |
func imagePickerController(picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [NSObject : AnyObject]) { | |
let mediaType = info[UIImagePickerControllerMediaType] as! NSString | |
dismissViewControllerAnimated(true) { | |
if mediaType == kUTTypeMovie { | |
let videoURL = info[UIImagePickerControllerMediaURL] as! NSURL |
This file contains 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 | |
public struct Percent { | |
private var _val: Float | |
} | |
public func == (left: Percent, right: Percent) -> Bool { | |
return left._val == right._val | |
} |