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.
-
-
Swift, Shells In The 1960s, And Some Swift Scripting Examples For Admins
The reason Ken Thompson wrote the Thompson Shell (/bin/sh) when he and the team at Bell Labs developed Unix was that they didn’t want to have to teach programming to people in the patent office, who funded the PDP they used to write Unix. Shell environments evolved over the years with tcsh, bash, and zsh to name a few. These added more concepts from programming environments, like the environment from C that the binaries they exposed were compiled in. Other languages emerged that were simpler than a language like C but added new techniques – and so perl, python, ruby, and others evolved. Some of those were either object-oriented from…
-
pyMacWarranty variant in Swift on my GitHub
Posted a new swift command line tool to accept serial number data from an Apple device and respond with warranty information about a device at https://github.com/krypted/swiftwarrantylookup. This is based on pyMacWarranty, at https://github.com/pudquick/pyMacWarranty.
-
Simple Swift Project To Run A Bash Script When A User Clicks A Button
New project on Github to run a bash script when a user clicks on a button. This is pretty basic, easily customizable, lots of stuff you could add, and with a license I’m sure anyone can appreciate. Hope you enjoy.
-
My LDIF to CSV Swift Converter
You can now find an ldif to csv converter done in Swift on my Github account at krypted/swift-ldif-csv. The project is pretty easy to use, simply define an input ldif file using the first positional parameter and then a csv using the -csv option. You can also use -a to define the attributes to migrate. Enjoy, fork, add, etc. For a quick download of the binary, click here.
-
Hello Swift
Let’s do a typical Hello World example in Swift. I have Xcode installed, so I can invoke a swift environment using xcrun, a command to start an interactive Xcode environment and then defining swift as the language I want to use, as follows using a standard Mac terminal session: $xcrun swift Then I get a welcome screen, which is kind: Welcome to Apple Swift version 2.1.1 (swiftlang-700.1.101.15 clang-700.1.81). Type :help for assistance. Then, I can throw some string into a variable: 1> let mystring = "Hello Swift" And I get a response that the string was accepted, as a string: mastering: String = "Hello Swift" Then I can just echo…