This procedure is tested on Mac OS X 10.10.5 with Developpers tools installed (xCode).
PHP 5.6 installed with Homebrew.
Download the following files from Oracle website (yes, you need to create an account and accept terms):
struct User: Codable { | |
var name: String | |
var email: String | |
var id: String | |
var metadata: [String: MetadataType] | |
enum CodingKeys: String, CodingKey { | |
case name, email, id, metadata | |
} | |
} |
This procedure is tested on Mac OS X 10.10.5 with Developpers tools installed (xCode).
PHP 5.6 installed with Homebrew.
Download the following files from Oracle website (yes, you need to create an account and accept terms):
#---------------------------------------------------------------- | |
# PREVENT YOUR CODEBASE GETTING SPOILED BY DEVELOPERS | |
# - YOU NEED TO THIS pre-commit file (without any extension) | |
# at ".git/hooks/" folder. | |
# - THEN TRY TO PUT WRONG STYLED/LINT CODE | |
#---------------------------------------------------------------- | |
branch="$(git rev-parse --abbrev-ref HEAD)" | |
#---------------------------------------------------------------- |
#!/usr/bin/swift | |
import Foundation | |
// MARK: - Script variables | |
let awsProfileName: String? = "myProfile" | |
let serviceName = "someService" | |
// MARK: - Functions | |
@discardableResult | |
func shell(_ args: String..., returnStdOut: Bool = false, stdIn: Pipe? = nil) -> (Int32, Pipe) { |
#!/bin/bash | |
message="" | |
#---------------------------------------------------------------- | |
# BUILD XCODE PROJECT & VALIDATE | |
#---------------------------------------------------------------- | |
xcodebuild test -workspace MicroappArcExample.xcworkspace -scheme MicroappArcExample -sdk iphonesimulator -destination 'platform=iOS Simulator,OS=16.1,name=iPhone 14' | |
if test $? -eq 0 |
# This workflow will build a Swift project | |
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-swift | |
name: Build and Archive | |
on: | |
pull_request: | |
branches: [ "release" ] |
// set custom level strings to add color | |
let console = ConsoleDestination() | |
console.levelString.Verbose = "💜 VERBOSE" | |
console.levelString.Debug = "💚 DEBUG" | |
console.levelString.Info = "💙 INFO" | |
console.levelString.Warning = "💛 WARNING" | |
console.levelString.Error = "❤️ ERROR" |
import UIKit | |
public extension UIFont { | |
class func loadAllFonts(bundleIdentifierString: String) { | |
registerFontWithFilenameString(filenameString: "icon-font.ttf", bundleIdentifierString: bundleIdentifierString) | |
// Add more font files here as required | |
} | |
static func registerFontWithFilenameString(filenameString: String, bundleIdentifierString: String) { |
import NIO | |
/// Author: vzsg (Discord) - https://twitter.com/vzsg_dev | |
/// Source: https://discordapp.com/channels/431917998102675485/684159753189982218/684537099378098272 | |
extension EventLoopFuture { | |
func tryFlatMap<NewValue>( | |
file: StaticString = #file, | |
line: UInt = #line, | |
_ callback: @escaping (Value) throws -> EventLoopFuture<NewValue> |