Skip to content

Instantly share code, notes, and snippets.

View aplekhanov's full-sized avatar
🇨🇾
Working from home

Alex Plekhanov aplekhanov

🇨🇾
Working from home
View GitHub Profile
// Advanced SwiftUI Transitions
// https://swiftui-lab.com
// https://swiftui-lab.com/advanced-transitions
import SwiftUI
struct CrossEffectDemo: View {
let animationDuration: Double = 2
let images = ["photo1", "photo2", "photo3", "photo4"]
@State private var idx = 0
@aplekhanov
aplekhanov / vim-swift-setup.sh
Created April 16, 2023 13:56 — forked from mgrider/vim-swift-setup.sh
Swift syntax highlighting for Vim
# Swift syntax highlighting for Vim
# Original Source: http://wingsquare.com/blog/swift-script-syntax-highlighting-and-indentation-for-vim-text-editor/
# Another helpful article: https://billyto.github.io/blog/swift-syntax-vim
# More about Vim packages: http://vimcasts.org/episodes/packages/
echo "--- creating ~/.vim/pack/bundle/start dir.."
mkdir -p ~/.vim/pack/bundle/start
echo "--- Cloning Apple's Swift repo.."

Commit Message Guidelines

Short (72 chars or less) summary

More detailed explanatory text. Wrap it to 72 characters. The blank
line separating the summary from the body is critical (unless you omit
the body entirely).

Write your commit message in the imperative: "Fix bug" and not "Fixed
bug" or "Fixes bug." This convention matches up with commit messages
//
// UIImage+PDF.swift. Copyright © 2016 Nigel Timothy Barber (@mindbrix). All rights reserved.
//
import UIKit
extension UIImage {
static func PDFImageWith(_ url: URL, pageNumber: Int, width: CGFloat) -> UIImage? {
return PDFImageWith(url, pageNumber: pageNumber, constraints: CGSize(width: width, height: 0))
}