git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"/> | |
<script src="https://pay.every-pay.eu/google_pay/google-pay-client-1.4.js"></script> | |
</head> | |
<body> | |
<div id="google-pay-container"> | |
<script> | |
// Initialize the Web SDK |
import Photos | |
struct UnexpectedNilError: Error {} | |
extension PHImageManager { | |
func requestImage( | |
for asset: PHAsset, | |
targetSize: CGSize, | |
contentMode: PHImageContentMode, | |
options: PHImageRequestOptions? |
// | |
// ContentView.swift | |
// LikeThumbUp | |
// | |
// Created by Amos Gyamfi on 14.8.2020. | |
// | |
import SwiftUI | |
struct ContentView: View { |
/** | |
* List of executables in Cloud Functions runtime. | |
* Invoke with https://us-central1-‹project-name›.cloudfunctions.net/ls | |
*/ | |
const functions = require( "firebase-functions"); | |
const spawn = require( "child-process-promise").spawn; | |
const ls = (req, res) => { | |
console.log( "Listing contents of /usr/[local/][s]bin"); | |
return spawn( "ls", |
import SwiftUI | |
private let linkDetector = try! NSDataDetector(types: NSTextCheckingResult.CheckingType.link.rawValue) | |
struct LinkColoredText: View { | |
enum Component { | |
case text(String) | |
case link(String, URL) | |
} |
import SwiftUI | |
import PlaygroundSupport | |
/// `InlineModifier` helps you apply a view modifier in a inline block. | |
public struct InlineModifier<R: View>: ViewModifier { | |
private let block: (Content) -> R | |
public init(@ViewBuilder _ block: @escaping (Content) -> R) { |
public extension UIImage { | |
func round(_ radius: CGFloat) -> UIImage { | |
let rect = CGRect(x: 0, y: 0, width: size.width, height: size.height) | |
let renderer = UIGraphicsImageRenderer(size: rect.size) | |
let result = renderer.image { c in | |
let rounded = UIBezierPath(roundedRect: rect, cornerRadius: radius) | |
rounded.addClip() | |
if let cgImage = self.cgImage { | |
UIImage(cgImage: cgImage, scale: self.scale, orientation: self.imageOrientation).draw(in: rect) | |
} |
// | |
// ContentView.swift | |
// TryGeometryReader | |
// | |
// Created by satoutakeshi on 2019/12/07. | |
// Copyright © 2019 satoutakeshi. All rights reserved. | |
// | |
import SwiftUI |
extension Binding { | |
/// Wrapper to listen to didSet of Binding | |
func didSet(_ didSet: @escaping ((newValue: Value, oldValue: Value)) -> Void) -> Binding<Value> { | |
return .init(get: { self.wrappedValue }, set: { newValue in | |
let oldValue = self.wrappedValue | |
self.wrappedValue = newValue | |
didSet((newValue, oldValue)) | |
}) | |
} | |