Skip to content

Instantly share code, notes, and snippets.

View phucledien's full-sized avatar
🇻🇳
Xin chào

Le Dien Phuc phucledien

🇻🇳
Xin chào
View GitHub Profile
@phucledien
phucledien / ios-interview-resources.md
Created October 9, 2020 07:08 — forked from funmia/ios-interview-resources.md
General iOS, CS questions and interview prep resources.
@phucledien
phucledien / SwiftElmFrameworkList.md
Created August 9, 2020 16:50 — forked from inamiy/SwiftElmFrameworkList.md
React & Elm inspired frameworks in Swift
@phucledien
phucledien / DisplayLink.swift
Created August 9, 2020 16:21 — forked from CanTheAlmighty/DisplayLink.swift
DisplayLink for OSX
extension Sequence {
func reduce<A>(_ initial: A, combine: (inout A, Iterator.Element) -> ()) -> A {
var result = initial
for element in self {
combine(&result, element)
}
return result
}
}
// Original article here: https://www.fivestars.blog/code/redacted-custom-effects.html
import SwiftUI
// MARK: Step 1: Create RedactionReason
public enum RedactionReason {
case placeholder
case confidential
@phucledien
phucledien / value_types.md
Created July 31, 2020 06:20 — forked from rbobbins/value_types.md
Build Better Apps with Value Types in Swift

Build Better Apps with Value Types in Swift

Agenda

  • Reference semantics
  • Immutability
  • Value semantics
  • Value types in practice
  • Mixing value types and reference types

Reference semantics

@phucledien
phucledien / TaskConcurrencyManifesto.md
Created July 30, 2020 15:44 — forked from lattner/TaskConcurrencyManifesto.md
Swift Concurrency Manifesto
struct ContentView: View {
var body: some View {
VStack{
Label("Hello Label", systemImage: "sun.min")
.font(.system(.title, design: .rounded))
Label("Title only label", systemImage: "sun.min")
.font(.system(.title, design: .rounded))
// Run any SwiftUI view as a Mac app.
import Cocoa
import SwiftUI
NSApplication.shared.run {
VStack {
Text("Hello, World")
.padding()
.background(Capsule().fill(Color.blue))

Keybase proof

I hereby claim:

  • I am phucledien on github.
  • I am phucld (https://keybase.io/phucld) on keybase.
  • I have a public key ASBiatEcxVZQ9aCLuqHPeKcmWtPgFsgs6GG9kkSCD70I5Qo

To claim this, I am signing this object: