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
17.0.0.0/21 | |
17.0.0.0/8 | |
17.0.0.0/9 | |
17.0.109.0/24 | |
17.0.117.0/24 | |
17.0.118.0/24 | |
17.0.120.0/24 | |
17.0.128.0/18 | |
17.0.153.0/24 | |
17.0.176.0/20 |
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
import Foundation | |
class Target {} | |
class WeakHolder { | |
weak var weak: Target? | |
} | |
for i in 0..<1000000 { | |
print(i) |
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
class FullResume { | |
let id: String | |
let age: Int | |
let hasVehicle: Bool | |
} |
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
class PaidService { | |
let id: String | |
let name: String | |
let isActive: Bool | |
let expiresAt: Date? | |
} | |
MemoryLayout<PaidService>.size // 8 | |
MemoryLayout<PaidService>.alignment // 8 | |
MemoryLayout<PaidService>.stride // 8 |
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
struct Test { | |
let firstBool: Bool | |
let array: [Bool] | |
let secondBool: Bool | |
let smallInt: Int32 | |
} |
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
struct ShortResume { | |
let age: Int32 | |
let hasVehicle: Bool | |
} |
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
struct FullResume { | |
let hasVehicle: Bool | |
let id: String | |
let age: Int | |
} | |
MemoryLayout<FullResume>.size // 32 ??? | |
MemoryLayout<Bool>.size // 1 | |
+ MemoryLayout<String>.size // 16 |
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
struct FullResume { | |
let id: String | |
let age: Int | |
let hasVehicle: Bool | |
} |
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
badgy long DEV App.png --angle 15 --position bottom --color '#FFD700' --tint-color '#8B7500' | |
# --color '#FFD700' - цвет фона | |
# --tint-color '#8B7500' - цвет текста |
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
func refreshToken(request: Request, refreshTokenDto: RefreshTokenDto) throws -> Future<AccessDto> { | |
let refreshTokenModel = RefreshToken | |
.query(on: request) | |
.filter(\.token == refreshTokenDto.refreshToken) | |
.first() | |
.unwrap(or: Abort(.unauthorized)) | |
return refreshTokenModel.flatMap { refreshTokenModel in | |
if refreshTokenModel.expiredAt > Date() { | |
return refreshTokenModel.user.get(on: request).flatMap { user in |
NewerOlder