Skip to content

Instantly share code, notes, and snippets.

@tyfoan
tyfoan / ContentView.swift
Last active January 6, 2023 22:08
Scale overlay issue
//
// ContentView.swift
// video-comparer
//
// Created by aleksanderogurtsov on 15.10.2022.
//
import AVKit
import SwiftUI
@tyfoan
tyfoan / VideoHelper.swift
Created October 29, 2022 18:20 — forked from Martini024/VideoHelper.swift
SwiftUI: Rewrite iOS Photos Video Scrubber
import Foundation
import AVKit
class VideoHelper {
static func getThumbnail(from player: AVPlayer, at time: CMTime) -> CGImage? {
do {
guard let currentItem = player.currentItem else { return nil }
let asset = currentItem.asset
let imgGenerator = AVAssetImageGenerator(asset: asset)
@tyfoan
tyfoan / Contributing.md
Created November 16, 2017 00:23 — forked from MarcDiethelm/Contributing.md
How to contribute to a project on Github

This text now lives at https://github.com/MarcDiethelm/contributing/blob/master/README.md. I turned it into a Github repo so you can, you know, contribute to it by making pull requests.


Contributing

If you want to contribute to a project and make it better, your help is very welcome. Contributing is also a great way to learn more about social coding on Github, new technologies and and their ecosystems and how to make constructive, helpful bug reports, feature requests and the noblest of all contributions: a good, clean pull request.

@tyfoan
tyfoan / controller.js
Created April 27, 2017 06:48 — forked from gritsenko-konstantin/controller.js
Description of best practice for controller <-> service interactions
'use strict';
class SomeController {
/**
* @param {SomeService} someService
*/
constructor(someService) {
this.__someService = someService;
}
/**