-
-
Save igolden/5352897442ca5c80c6fb028de4b90a39 to your computer and use it in GitHub Desktop.
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
#!/bin/ruby | |
cmds = [ | |
# "SPInstallHistoryDataType", | |
"SPBluetoothDataType", | |
# SPNetworkLocationDataType, | |
# SPDiagnosticsDataType, | |
# SPUSBDataType, | |
# SPSoftwareDataType, | |
#SPCameraDataType, | |
#SPAirPortDataType, | |
#SPDisplaysDataType, | |
#SPFontsDataType, | |
# SPFrameworksDataType, | |
#SPAudioDataType, | |
#SPHardwareDataType, | |
#SPNetworkDataType, | |
#SPMemoryDataType, | |
#SPPrintersDataType, | |
#SPSerialATADataType, | |
#SPNetworkVolumeDataType, | |
#SPThunderboltDataType | |
] | |
def install_history | |
# filter | |
# system_profiler SPInstallHistoryDataType | grep '^.*\w*:$' | |
# Get what programs have been installed recently. Could be useful | |
# === | |
# | |
# @param program_title : string | |
# @param dated_installed : date | |
# @param version : string | |
# | |
end | |
class OSX | |
def self.bluetooth | |
system "system_profiler SPBluetoothDataType" | |
end | |
def self.install_history | |
system "system_profiler SPInstallHistoryDataType" | |
end | |
def self.network_location | |
system "system_profiler SPNetworkLocationDataType" | |
end | |
def self.diagnostics | |
system "system_profiler SPDiagnosticsDataType" | |
end | |
end | |
#OSX.bluetooth | |
#OSX.install_history | |
#OSX.network_location | |
OSX.diagnostics | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment