• Apple

    MacSysAdmin Keynote Deck

    Just finished delivering the keynote for MacSysAdmin with Joel Rennich and how wonderful it is to see so many wonderful people who I’ve missed getting to hang out with in person for years! Here’s the presentation we gave (as promised) for anyone interested – and I’ll link to the video when it’s uploaded!

  • Apple,  Mac OS X,  Mac OS X Server,  SQL

    Install and Setup mongodb on a Mac

    I don’t write as much about what I do at my day job as I used to. I probably should, because it’s all still relavant to my older readers. One example of that is that I have published a lot of articles on MySQL and sqlite. However, more and more of my development efforts use native json. I’ve slowly fallen in love with mongodb for this reason – I can have a local database that is fast, that stores data in native json. That makes my transactions cheaper when it’s time to read and write for databases. If I have to regex to put information in sql and then take…

  • Apple,  Mac Security

    Our Journey To A Quantum-Safe Secret Manager

    Once upon a time, when the COVID was upon us, I retreated into my lab to write a book on the history of computing. I was fortunate, privileged, and delighted to get the chance to interview some of the people who built the foundational technologies that power our digital lives. People who invented the first data packets, installed the first nodes on the internet, developed the first search engines, and founders of companies that have become household names. Many from the history of computing began their careers as academics. Their original research was published as they pursued their PhDs. I started to notice some trends. A few notable ones caught…

  • Apple,  Swift

    Penn State and MacAD.UK Presentations

    Working on presentations is always fun! Here are two that I’m giving this summer. The first is part one of a deck on Extensions Management (and more on the past of managing them). That was delivered at MacAD.UK and I’ll post the video once those are up. The second is a deeper dive into the current state of extensions management, which I’m giving at Penn State MacAdmins. Hope these help someone in some way, shape, or form.

  • Apple,  Machine Learning,  Machine Learning And Artificial Intelligence,  Programming,  Swift

    New App TestFairy Writes Unit Tests With AI

    I just posted a new app to GitHub called TestFairy. It’s at https://github.com/krypted/TestFairy. It automatically generates unit tests for either a file or a highlighted piece of swift code. It does this using the OpenAI API, so leverages a LLM to write test code. It’s pretty straight forward. Simply highlight the code and in the Editor Menu, click TestFairy, then Generate Tests. I had hoped to post it for free to the App Store, but I didn’t want to distribute my OpenAI API key, or write an intermediary microservice that housed my key that an app uses. The use of an API key is considered an end-around to the In-App…

  • Apple

    Using Viruses For Good

    I get prompted any time one of my books is cited in legitimate research journals. A group of Kuwaiti researchers wrote a paper that, to quote the researchers, finds that “In a nutshell, this research indicates that there is a possibility of converting computer viruses into beneficial programs for storage space and CPU optimization.” The paper is available here: http://www.jatit.org/volumes/Vol101No10/19Vol101No10.pdf I’ve often said that agent-based device management tools (and let’s keep in mind that MDM is an Apple-supplied agent) are in a way commercially supported advanced persistent threats. After all, they have similar command and control architectures… These are often larger, monolithic architectures that grow, and so consume more resources…

  • Apple,  public speaking,  Swift

    MacAD.UK Presentation (with notes) on Extensions

    I’ve been working on this presentation for a long time, so it was awesome to get the first chunk of it out there. Then I saw Graham Pugh publish his with presenter notes included and was like “oh Graham’s really, really smart, so I’ll copy him!” so here’s mine: Just to put a little color on this (or colour if you’re in Brighton), some of my work on extensions has been in support of building https://www.secretchest.io – a new password manager that shards secrets like keys, passwords, and passkeys to make them quantum safe. There’s a sign-up to get access to our private beta on the site. That started with…

  • Apple,  Machine Learning,  Machine Learning And Artificial Intelligence,  Programming,  Python

    Detecting LLM-Generated Code

    Large language models (LLMs) are a type of artificial intelligence that generates text, translates languages, writes different kinds of creative content, creates net-new artistic works, and answers questions in an informative way. They are trained on massive datasets of text and code, and can learn to produce human-quality output. Because of how they import massive troves of data and create similar content, they can then be fairly formulaic in their output.  A few things to look for to help determine if code was written by an LLM: If you are suspicious that a piece of code was written by an LLM, you can use a number of tools to help…

  • Apple,  Programming,  SQL

    Simple sqlite3 Fuzzer

    One of my favorite ways to find escape defects in code is to employ a generic fuzzer. I typically have 5-10 laptops running fuzzers for various projects at a time. I was recently doing some research on sqlite3 and so started to fuzz the implementation built into macOS. The fuzzer generates random SQL statements and executes them against a SQLite database file. If any errors are encountered, they will be printed to the console: There’s not much logic here. Add more complex tests to improve it. Like SQL grammar to generate valid SQL statements, or a genetic algorithm to evolve SQL statements that are more likely to find bugs. Use…

  • Apple,  Programming

    Google Cloud Function To Create A Google Doc

    Here’s a Google Cloud Function that creates a Google Doc based on a title and body from a json document: https://github.com/krypted/tinyconverters/blob/main/json_to_new_google_doc.py To use it, you’ll need to enable the Google Docs API from the Google Cloud Project and create a service account to get a JSON key file that’s saved in the same folder the cloud function is uploaded to. Once the Cloud Function is deployed, grab the URL and use it as follows: