I recently posted some converters to handle different types of data transmogrification. When handling document structures, we should lint them pre- and post-processing, so here are some Google Cloud Functions to handle that (for the three more common formats that I work with):
-
-
Google Cloud Function To Convert Property Lists To JSON Documents
I’ve written a lot of little scripts to convert files or types from one format to another, over the years. It’s easier to import something that can do the work for you and just use a Lambda or a Google Cloud Function that you call from other tools. This is the microservice way. So here’s a little python Google Cloud Function that converts a property list to a JSON document: To use the function, first create a Google Cloud Function that uses the property_list_to_json() function from the Google Cloud Console or the gcloud CLI. Once you have the URL, simply call it with a POST to the function’s URL. The…
-
Simple Swift Fuzzer
Sometimes we want to test a function to see how… robust it is. This is a small example fuzzing function to input randomly generated characters that get passed to another function. It just uses randomBytes so much more logic could easily be added to constrain what’s being passed to whatever type it’s being passed to… but this satisfies my need. import Foundation func fuzz(function: () -> Void) { // Generate a random input to pass to the function we are fuzzing let input = Data(randomBytes: 1024) // Call the fuzzed function with the random input do { try function() } catch { print(error) } // Check the fuzzed function to…
-
Tiny hex and binary converters in swift, go, python, && javascript
Have a few scripts that I’ve been bringing into projects for awhile (and altering for each so ymmv on the state, but you’ll get the general idea). https://github.com/krypted/tinyconverters As the names and file extensions imply, these simply take ascii as an input and output as binary or hex, or take the binary or hex and output as ascii.
-
Make The Keychain Work When Compiling Your Own NoMAD
Yesterday, I wrote up how to compile your own version of an open source Xcode app and used NoMAD as an example, for those who didn’t want to use the precompiled application bundle. Many software packages have permissions to do do various tasks. NoMAD interacts with the keychain, so will have to use a TeamID, or to expand the term, the Team Identifier Prefix. This means the new version won’t be able to access keychain items created by previous versions of NoMAD, which use the creators prefix (I didn’t reference Joel as “the Creator” – but “a creator” to be clear). Ergo, this article is really just for helping those…
-
Quick And Dirty Guide To Compiling Your Own Version Of An Open Source Xcode Project For Testing
There are plenty of apps out there that can be beneficial to an organization, but don’t really make sense to live on an app store. This might be because the app uses private APIs, breaks acceptable design patterns, needs to be customized for every use case, is just proof of concept code, etc, etc, etc. Anyone with an Apple Developer certificate can compile an app to test it on their local machine. We can go into more detail later for people that want to then distribute/re-distribute those apps… To get started, first we’ll clone the project to our local machine. To do so, in Github or Gitlab or wherever it…
-
Test A Fork Of NoMAD Maybe?
tldr: here’s a slightly modernized fork of NoMAD that needs a little testing: https://gitlab.com/krypted1/nomad2 Been working on a fork of NoMAD that will hopefull just modernize code and get merged back in. In general, the changes shouldn’t be noticed with a big exception, it’s a breaking change for machines that run an operating system older than Catalina. Apple changes APIs and so we have the option to either introduce a breaking change or make the code really complicated by retaining existing code or moving to new APIs. So this version starts to transition away from UIKit and towards Swift UI. It also removes Carthage in favor of Swift Package Manager.…