This file contains hidden or 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
| extension Published: Decodable where Value: Decodable { | |
| public init(from decoder: Decoder) throws { | |
| try self.init(initialValue: Value(from: decoder)) | |
| } | |
| } | |
| extension Published: Encodable where Value: Encodable { | |
| public func encode(to encoder: Encoder) throws { | |
| let mirror = Mirror(reflecting: self) | |
| // The internal structure uses a `Storage` enum |
This file contains hidden or 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
| // | |
| // main.m | |
| // ProtectTest | |
| // Demonstrates newer versions of iOS now support PROT_EXEC pages, for just-in-time compilation. | |
| // | |
| // Must be compiled with Thumb disabled | |
| // | |
| // Created by Stuart Carnie on 3/4/11. | |
| // Copyright 2011 Manomio LLC. All rights reserved. | |
| // |
This file contains hidden or 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
| # Packet loss rate (percentage, 0.0-1.0) | |
| PLR=0.25 | |
| # Delay in ms | |
| DELAY=300 | |
| # Host to filter | |
| HOST=example.com | |
| ipfw pipe 1 config bw 800Kbit plr "$PLR" delay "$DELAY" |