Skip to content

Instantly share code, notes, and snippets.

This code is looking for proxy

env|grep -i proxy

Definitions

The Kernel Framework provides the APIs and support for kernel-resident device drivers and other kernel extensions. The kernel connects the system hardware to the application software, and every operating system has a kernel.

  • library, and its synonyms like a static library, static framework
  • framework, and its synonyms like a dynamic framework
func getDocumentsDirectory() -> URL {
let paths = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask)
let documentsDirectory = paths[0]
return documentsDirectory
}
let fm = FileManager.default
let path = Bundle.main.resourcePath!
do {
let items = try fm.contentsOfDirectory(atPath: path)
for item in items {
print("Found \(item)")
}
} catch {

Protocol with Associated Types

Associated types are a powerful way of making protocols generic. Generic enables you to write flexible, reusable functions and types that can work with any type, subject to requirements that you define.

S → Single-responsiblity principle O → Open-closed principle L → Liskov substitution principle I → Interface segregation principle D → Dependency Inversion Principle