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
#!/usr/bin/env bash | |
set -euo pipefail | |
output="$(apt-cache policy ansible)" | |
installed="$(echo "$output" | sed -n -r 's/^(.*)(Installed: )(.*)$/\3/p')" | |
candidate="$(echo "$output" | sed -n -r 's/^(.*)(Candidate: )(.*)$/\3/p')" | |
if [[ $installed != "$candidate" ]]; then | |
echo Install Ansible | |
curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add - |
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
# https://developer.apple.com/library/archive/documentation/MacOSX/Conceptual/BPSystemStartup/Chapters/CreatingLoginItems.html | |
# https://stackoverflow.com/a/69404641 | |
# Using Apple Script | |
# list loginitems | |
osascript -e 'tell application "System Events" to get the name of every login item' | |
# list details of login items | |
osascript -e 'tell application "System Events" to get the properties of every login item' |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Label</key> | |
<string>limit.maxfiles</string> | |
<key>ProgramArguments</key> | |
<array> | |
<string>launchctl</string> | |
<string>limit</string> |
OlderNewer