- Feature
- Background
- Scenario
- Given
- When
- Then
- And
Das BMVI hat eine völlig nutzlose App gebaut. Eine Autobahn-Info App.
Nein, es gibt jetzt nämlich eine offene API für aktuelle Verwaltungsdaten in Bezug auf Baustellen-Informationen, Webcams, Parkplätze, … - bestimmt für jemand nützlich.
Hier gibt es eine OpenAPI Spec von @creckord: https://gist.github.com/creckord/a2e09267f5fdfadc2cd75eedb3182b8a
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
# From https://gist.github.com/778535 | |
# In turn based on http://www.natontesting.com/2010/01/11/updated-script-to-list-all-cucumber-step-definitions/ | |
desc "List all available steps" | |
task :steps do | |
require 'hirb' | |
extend Hirb::Console | |
features_dir = "features" | |
step_candidates = Dir.glob(File.join(features_dir,'**/*.rb')) | |
# Follow all the gem requires, and identify which files have steps in them |
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
# Generate a new pgp key: (better to use gpg2 instead of gpg in all below commands) | |
gpg --gen-key | |
# maybe you need some random work in your OS to generate a key. so run this command: `find ./* /home/username -type d | xargs grep some_random_string > /dev/null` | |
# check current keys: | |
gpg --list-secret-keys --keyid-format LONG | |
# See your gpg public key: | |
gpg --armor --export YOUR_KEY_ID | |
# YOUR_KEY_ID is the hash in front of `sec` in previous command. (for example sec 4096R/234FAA343232333 => key id is: 234FAA343232333) |
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
protocol Randomizer { | |
static func randomIv() -> Data | |
static func randomSalt() -> Data | |
static func randomData(length: Int) -> Data | |
} | |
protocol Crypter { | |
func encrypt(_ digest: Data) throws -> Data | |
func decrypt(_ encrypted: Data) throws -> Data | |
} |
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
//------------------------------------------------------------------------ | |
// The SwiftUI Lab: Advanced SwiftUI Animations | |
// https://swiftui-lab.com/swiftui-animations-part1 (Animating Paths) | |
// https://swiftui-lab.com/swiftui-animations-part2 (GeometryEffect) | |
// https://swiftui-lab.com/swiftui-animations-part3 (AnimatableModifier) | |
//------------------------------------------------------------------------ | |
import SwiftUI | |
struct ContentView: View { | |
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
// | |
// Asymmetric.swift | |
// | |
// Created by David Hoerl on 12/23/18. | |
// Copyright © 2018 David Hoerl. All rights reserved. | |
// | |
/* | |
This is the portion you need in the distributed app, which uses the public key that can appear in plain text | |
*/ |
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
//Reference: https://stackoverflow.com/questions/53906275/rsa-public-key-created-in-ios-swift-and-exported-as-base64-not-recognized-in-jav | |
import SwiftyRSA | |
class RSAKeyEncoding: NSObject { | |
// ASN.1 identifiers | |
private let kASNBitStringIdentifier: UInt8 = 0x03 | |
private let kASNSequenceIdentifier: UInt8 = 0x30 | |
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 getPublicKey64() -> String? { | |
var error: UnsafeMutablePointer<Unmanaged<CFError>?>? | |
let publicK = SecKeyCopyExternalRepresentation(self.publicKey!, error) as Data? | |
let exportedPublicK = publicK?.base64EncodedString() | |
print("exported PublicK ",exportedPublicK!) | |
return exportedPublicK! as String | |
} | |
func getPrivateKey64() -> String? { | |
var error: UnsafeMutablePointer<Unmanaged<CFError>?>? | |
let privateK = SecKeyCopyExternalRepresentation(self.privateKey!, error) as Data? |
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 | |
import Security | |
struct RSAEncryption { | |
var publicKey: SecKey! | |
init(publicKeyString: String) throws { | |
self.publicKey = try makePublicKey(from: publicKeyString) | |
} | |