Reference - https://www.eriksmistad.no/getting-started-with-google-test-on-ubuntu/
sudo apt-get install libgtest-dev
sudo apt-get install cmake # install cmake
cd /usr/src/gtest
sudo cmake CMakeLists.txt
| name: Nightly Build | |
| on: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: '0 0,12 * * *' | |
| jobs: | |
| nightly-build: | |
| uses: ./.github/workflows/tag-builds.yml | |
| secrets: inherit |
| export $(cat .env.dev | xargs) |
Reference - https://www.eriksmistad.no/getting-started-with-google-test-on-ubuntu/
sudo apt-get install libgtest-dev
sudo apt-get install cmake # install cmake
cd /usr/src/gtest
sudo cmake CMakeLists.txt
| enum StringOrInt: Codable { | |
| case string(String) | |
| case int(Int) | |
| init(from decoder: Decoder) throws { | |
| let container = try decoder.singleValueContainer() | |
| if let value = try? container.decode(Int.self) { | |
| self = .int(value) | |
| return | |
| } |
| import SwiftUI | |
| extension View { | |
| public func offset(_ offset: CGPoint) -> Self.Modified<_OffsetEffect> { | |
| self.offset(x: offset.x, y: offset.y) | |
| } | |
| } | |
| struct ContentView : View { | |
| @State var location: Double = 0 |
| import SwiftUI | |
| extension View { | |
| public func offset(_ offset: CGPoint) -> Self.Modified<_OffsetEffect> { | |
| self.offset(x: offset.x, y: offset.y) | |
| } | |
| } | |
| struct ContentView : View { | |
| //Trying out a prefix operator | |
| //I thought vertical elipses made sense, representative of rbg | |
| prefix operator ⋮ | |
| prefix func ⋮(hex:UInt32) -> Color { | |
| return Color(hex) | |
| } | |
| extension Color { | |
| init(_ hex: UInt32, opacity:Double = 1.0) { | |
| let red = Double((hex & 0xff0000) >> 16) / 255.0 |
| import Foundation | |
| import Alamofire | |
| import AlamofireImage | |
| extension UIImageView { | |
| func loadImage(_ url:String?) { | |
| guard let url = url else { return } | |
| Alamofire.request(url).responseImage {[weak self] response in | |
| guard let self = self else { return } | |
| if let image = response.result.value { |
| #import <UIKit/UIKit.h> | |
| NS_ASSUME_NONNULL_BEGIN | |
| @interface RoundedCornerView : UIView | |
| @property (nonatomic) IBInspectable CGFloat cornerRadius; | |
| @end | |
| NS_ASSUME_NONNULL_END |
| #define RANDOM_COLOR [[UIColor alloc] initWithRed:arc4random()%256/256.0 green:arc4random()%256/256.0 blue:arc4random()%256/256.0 alpha:1.0] |