This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let items = [1, 2, 3, 4, 5, 6] | |
var subitems: [Int] = [] | |
for item in items where item > 3 { | |
subitems.append(item) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let items = [1, 2, 3, 4, 5, 6] | |
var subitems: [Int] = [] | |
for item in items { | |
if item > 3 { | |
subitems.append(item) | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Variables | |
local_path="http://localhost:2368/" | |
github_path="https://brunodelgado.github.io" | |
output_folder="./Developer/brunodelgado.github.io" # Use . instead of ~ in order to properly work with wget | |
clear_output_folder_before_generating_files=true | |
# Colors | |
NOCOLOR='\033[0m' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class AnyDiskCache { | |
static func invalidate(name: String) throws { | |
let manager = FileManager.default | |
let urls = manager.urls(for: .cachesDirectory, in: .userDomainMask) | |
let url = urls[0].appendingPathComponent(name + ".cache") | |
try manager.removeItem(at: url) | |
} | |
} | |
final class DiskCache<T: Codable>: AnyDiskCache { |