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
View: Pods(<namespace>)[number of pods listed] | |
NAME pod name | |
READY number of pods in ready state / number of pods to be in ready state | |
RESTARTS number of times the pod has been restarted so far | |
STATUS state of the pod life cycle, such as Running | ... | Completed | |
CPU current CPU usage, unit is milli-vCPU | |
MEM current main memory usage, unit is MiB | |
%CPU/R current CPU usage as a percentage of what has been requested by the pod | |
%MEM/R current main memory usage as a percentage of what has been requested by the pod |
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 | |
for f in `ls *.gyb` | |
do | |
echo "Processing $f" | |
name=${f%.gyb} | |
../../../utils/gyb -D CMAKE_SIZEOF_VOID_P=8 -o $name $f --line-directive "" | |
done |
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
import Foundation | |
let bothValues = """ | |
{ | |
"key": "1", | |
"value": "111" | |
} | |
""".data(using: .utf8)! | |
let valueNull = """ |
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
import MobileCoreServices | |
fileprivate let defaultMimeType = "application/octet-stream" | |
protocol PathExtensionable { | |
var pathExtension: String? { get } | |
} | |
extension URL : PathExtensionable { | |
var pathExtension: String? { |
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
// | |
// PhotoOperations.swift | |
// ClassicPhotos | |
// | |
// Created by jos on 1/19/17. | |
// Copyright © 2017 raywenderlich. All rights reserved. | |
// | |
import Foundation | |
import UIKit |
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
import UIKit | |
extension UIImage { | |
func fill(with color: UIColor) -> UIImage? { | |
UIGraphicsBeginImageContextWithOptions(size, false, UIScreen.main.scale) | |
guard let context = UIGraphicsGetCurrentContext(), let cgImage = cgImage else { return nil } | |
let rect = CGRect(origin: .zero, size: size) |
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
extension RawRepresentable where RawValue == Int { | |
static var itemsCount: Int { | |
var index = 0 | |
while Self(rawValue: index) != nil { index += 1 } | |
return index | |
} | |
static var items: [Self] { | |
var items: [Self] = [] |
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
import Foundation | |
final class ___FILEBASENAMEASIDENTIFIER___ { | |
// MARK: Public | |
// MARK: Initial | |
deinit { | |
print("\(type(of: self)) deinit") |
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
// | |
// Created by Dima Vartanian on 10/29/15. | |
// | |
import Foundation | |
import Crashlytics | |
// this method gives us pretty much the same functionality as the CLS_LOG macro, but written as a Swift function, the only differences are that we have to use array syntax for the argument list and that we don't get see if the method being called is a class method or an instance method. We also have to define the DEBUG compiler flag with -D SWIFT_DEBUG. | |
// usage: |