├── .gitignore ├── _config.yml ├── update.sh ├── for-nhoizey.sh ├── README.md ├── Brewfile ├── run.sh └── LICENSE /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | .DS_Store 3 | -------------------------------------------------------------------------------- /_config.yml: -------------------------------------------------------------------------------- 1 | theme: jekyll-theme-hacker -------------------------------------------------------------------------------- /update.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | ## README 4 | # /!\ Ce script de mise à jour est conçu pour mon usage. Ne le lancez pas sans vérifier chaque commande ! /!\ 5 | 6 | brew update 7 | brew upgrade 8 | brew prune 9 | 10 | brew cask outdated --greedy --verbose | grep -v '(latest)' | cut -f1 -d" " | xargs -I % sh -c 'brew cask uninstall %; brew cask install %;' 11 | 12 | brew cleanup -s 13 | brew cask cleanup 14 | 15 | brew doctor 16 | 17 | echo "" 18 | echo "ET VOILÀ !" 19 | -------------------------------------------------------------------------------- /for-nhoizey.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | ## README 4 | # /!\ This installation script is designed for my OWN use. 5 | # Do not run it without checking each command! 6 | # 7 | # This additional automation directly launches the installation of 8 | # **my own selection** of applications for **my own computer**, 9 | # after initial connection to the Mac App Store: 10 | # 11 | # $ curl -sfL https://nhoizey.github.io/macOS-init/for-nhoizey.sh | sh 12 | 13 | mkdir $HOME/Downloads/macOS-init 14 | cd $HOME/Downloads/macOS-init 15 | curl -sL https://github.com/nhoizey/macOS-init/archive/main.zip -o main.zip 16 | unzip -qj main.zip 17 | rm main.zip for-nhoizey.sh 18 | chmod +x run.sh 19 | ./run.sh 20 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # macOS init 2 | 3 | [![GitHub stars](https://img.shields.io/github/stars/nhoizey/macOS-init.svg?style=for-the-badge&logo=github)](https://github.com/nhoizey/macOS-init/stargazers) 4 | [![Follow @nhoizey@mamot.fr](https://img.shields.io/mastodon/follow/000262395?domain=https%3A%2F%2Fmamot.fr&style=for-the-badge&logo=mastodon&logoColor=white&color=6364FF)](https://mamot.fr/@nhoizey) 5 | 6 | This set of scripts automate the installation of applications and synchronization of settings, on a freshly installed macOS. 7 | 8 | > [!CAUTION] 9 | > This script was designed for **my own specific needs**. 10 | > Before using it, remember to modify it to suit your needs! 11 | 12 | ## Usage 13 | 14 | ### Initial installation of a pristine OS 15 | 16 | 1. Install macOS 17 | 1. Run Mac App Store and log in to your account 18 | 19 | ### First step 20 | 21 | 1. Download the latest version: [main.zip](https://github.com/nhoizey/macOS-init/archive/main.zip) 22 | 1. Open the `run.sh` and `Brewfile` files, and change what is installed by default 23 | 1. Starting from the line `# Configuration` in the `run.sh` file, the script configures a number of default settings, which you can modify as required 24 | 1. Then [open macOS terminal](https://www.wikihow.tech/Use-Terminal-on-Mac#Opening-Terminal), drag and drop the `run.sh` file from the Finder to the Terminal, press the Enter key, and fasten your seatbelt… 😁 25 | 26 | The script will largely work without your intervention, except : 27 | 28 | - to validate the installation of Homebrew 29 | - to enter the administrator password for Homebrew 30 | - for the administrator password needed for Cask 31 | - for certain software that requires admin access 32 | 33 | If all goes well, it will finish normally without error, but if there is an error, you can restart the script and only what has not already been installed will be installed; 34 | 35 | There's no second step. That's it, you're ready to start using your new computer. 36 | 37 | ### Later updates 38 | 39 | 1. Run the `update.sh` script to update any applications that require it. 40 | -------------------------------------------------------------------------------- /Brewfile: -------------------------------------------------------------------------------- 1 | # https://github.com/Homebrew/homebrew-bundle 2 | 3 | # ----------------------------------------------------------------------------- 4 | # Homebrew taps 5 | # ----------------------------------------------------------------------------- 6 | 7 | tap 'homebrew/cask' 8 | tap 'homebrew/cask-fonts' 9 | tap 'homebrew/cask-versions' 10 | tap 'homebrew/bundle' 11 | tap 'homebrew/cask-drivers' 12 | tap 'nhoizey/cask' 13 | 14 | # ----------------------------------------------------------------------------- 15 | # Settings 16 | # ----------------------------------------------------------------------------- 17 | 18 | # Define where to put installed applications 19 | cask_args appdir: '/Applications' 20 | 21 | # Allow installation of AppStore applications 22 | brew 'mas' 23 | 24 | # ----------------------------------------------------------------------------- 25 | # Applications to install 26 | # ----------------------------------------------------------------------------- 27 | 28 | # Network 29 | brew 'curl' 30 | brew 'dnsmasq', restart_service: true 31 | brew 'openssh' 32 | brew 'openssl' 33 | brew 'openvpn' 34 | brew 'rsync' 35 | brew 'wget' 36 | cask 'controlplane' 37 | cask 'ngrok' 38 | cask 'protonvpn' 39 | cask 'transmission' 40 | 41 | # Terminal 42 | brew 'autojump' 43 | brew 'joe' 44 | brew 'starship' 45 | brew 'zsh' 46 | brew 'zsh-autosuggestions' 47 | brew 'zsh-syntax-highlighting' 48 | cask 'iterm2' 49 | 50 | # UI and usage 51 | brew 'glance-chamburr' 52 | cask 'qlmarkdown' 53 | cask 'raycast' 54 | cask 'setapp' 55 | cask 'swiftdefaultappsprefpane' 56 | cask 'syntax-highlight' 57 | mas 'Amphetamine', id: 937984704 58 | 59 | # Misc utilities 60 | brew 'duti' 61 | cask '1password' 62 | cask 'deepl' 63 | cask 'enca' 64 | cask 'jq' 65 | cask 'keeper-password-manager' 66 | cask 'grandperspective' 67 | cask 'screenflow9' 68 | cask 'yemuzip' 69 | 70 | # Backup and sync 71 | cask 'backblaze' 72 | cask 'carbon-copy-cloner' 73 | cask 'dropbox' 74 | cask 'google-drive-file-stream' 75 | 76 | # Web 77 | cask 'firefox' 78 | cask 'google-chrome' 79 | cask 'google-chrome-canary' 80 | 81 | # Development 82 | brew 'git' 83 | brew 'node' 84 | brew 'nvm' 85 | brew 'pkg-config' 86 | # https://github.com/tonsky/FiraCode/wiki#installing-font 87 | cask 'font-fira-code' 88 | # https://github.com/ryanoasis/nerd-fonts#option-4-homebrew-fonts 89 | cask 'font-hack-nerd-font' 90 | cask 'github' 91 | cask 'meld' 92 | cask 'polypane' 93 | cask 'reflector' 94 | cask 'visual-studio-code' 95 | 96 | # Images 97 | cask 'imageoptim' 98 | 99 | # Videos 100 | brew 'ffmpeg' 101 | brew 'yt-dlp' 102 | cask 'autosubsync' 103 | cask 'catch' 104 | cask 'handbrake' 105 | cask 'losslesscut' 106 | cask 'mkvtoolnix' 107 | cask 'plex' 108 | cask 'subler' 109 | cask 'subsmarine' 110 | cask 'vlc' 111 | 112 | # Photo 113 | cask 'adobe-creative-cloud' 114 | 115 | # Communication 116 | cask 'signal' 117 | cask 'whatsapp' 118 | mas 'Slack', id: 803453959 119 | mas 'Ivory for Mastodon by Tapbots', id: 6444602274 120 | 121 | # Office and productivity 122 | cask 'microsoft-teams' 123 | cask 'netnewswire' 124 | cask 'obsidian' 125 | 126 | # Misc 127 | cask 'yacreader' 128 | 129 | # ----------------------------------------------------------------------------- 130 | # Visual Studio Code extensions 131 | # ----------------------------------------------------------------------------- 132 | 133 | # TODO: check if those extensions are all really useful 134 | 135 | # Must have 136 | vscode "nhoizey.gremlins" 137 | 138 | # VS Code UI 139 | vscode "MS-CEINTL.vscode-language-pack-fr" 140 | vscode "johnpapa.vscode-peacock" 141 | 142 | # Working with text 143 | vscode "medo64.render-crlf" 144 | vscode "timonwong.shellcheck" 145 | vscode "sandcastle.whitespace" 146 | vscode "brunnerh.insert-unicode" 147 | vscode "zeithaste.cursorCharCode" 148 | 149 | # HTML tools 150 | vscode "formulahendry.auto-close-tag" 151 | vscode "formulahendry.auto-rename-tag" 152 | vscode "vincaslt.highlight-matching-tag" 153 | 154 | # Files and folders manipulations 155 | vscode "moshfeu.compare-folders" 156 | vscode "mrmlnc.vscode-duplicate" 157 | 158 | # Git tools 159 | vscode "eamodio.gitlens" 160 | 161 | # npm tools 162 | vscode "wix.vscode-import-cost" 163 | vscode "christian-kohler.npm-intellisense" 164 | vscode "pflannery.vscode-versionlens" 165 | 166 | # File formats/colorizer 167 | vscode "tamasfe.even-better-toml" 168 | vscode "mrmlnc.vscode-apache" 169 | vscode "sharat.vscode-brewfile" 170 | vscode "github.vscode-github-actions" 171 | vscode "mikestead.dotenv" 172 | vscode "ronnidc.nunjucks" 173 | vscode "SomewhatStationery.some-sass" 174 | vscode "joshbolduc.story-explorer" 175 | vscode "jock.svg" 176 | 177 | # Markdown tools 178 | vscode "shd101wyy.markdown-preview-enhanced" 179 | vscode "darkriszty.markdown-table-prettify" 180 | vscode "DavidAnson.vscode-markdownlint" 181 | vscode "unifiedjs.vscode-mdx" 182 | 183 | # Noctis Theme 184 | vscode "liviuschera.noctis" 185 | 186 | # Code formater/beautifier 187 | vscode "esbenp.prettier-vscode" 188 | vscode "mohsen1.prettify-json" 189 | vscode "stylelint.vscode-stylelint" 190 | 191 | # Miscelanous 192 | vscode "oderwat.indent-rainbow" 193 | vscode "christian-kohler.path-intellisense" 194 | vscode "MohammadBaqer.better-folding" 195 | vscode "kamikillerto.vscode-colorize" 196 | vscode "GitHub.copilot" 197 | vscode "aaron-bond.better-comments" 198 | -------------------------------------------------------------------------------- /run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | ## README 4 | # /!\ This installation script is designed for my OWN use. 5 | # Do not run it without checking each command! 6 | 7 | # Inspirations: 8 | # https://github.com/nicolinuxfr/macOS-post-installation 9 | # https://github.com/OzzyCzech/dotfiles/blob/master/.osx 10 | 11 | echo "Asking the the administrator password upfront" 12 | sudo -v 13 | 14 | # Keep-alive: updates the `sudo` timestamp until `post-install.sh` is finished 15 | while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null & 16 | 17 | if test ! "$(which brew)" 18 | then 19 | echo "Installing Homebrew" 20 | /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" 21 | fi 22 | 23 | echo "Adding Homebrew binaries to the PATH" 24 | echo '# Set PATH, MANPATH, etc., for Homebrew.' >> ~/.zprofile 25 | echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.zprofile 26 | eval "$(/opt/homebrew/bin/brew shellenv)" 27 | 28 | echo "Update the list of applications available with Homebrew" 29 | brew update 30 | 31 | echo "Installing most applications with Homebrew and Mac App Store CLI" 32 | brew bundle 33 | 34 | # Allow certain applications to be launched despite the quarantine 35 | # TODO: update the list with all applications requiring this 36 | sudo xattr -dr com.apple.quarantine /Applications/Firefox.app 37 | sudo xattr -dr com.apple.quarantine /Applications/Google\ Chrome.app 38 | sudo xattr -dr com.apple.quarantine /Applications/iTerm.app 39 | sudo xattr -dr com.apple.quarantine /Applications/Visual\ Studio\ Code.app 40 | 41 | echo "Installation of Node development tools" 42 | npm install -g npm-check-updates 43 | 44 | # ----------------------------------------------------------------------------- 45 | # macOS configuration 46 | # ----------------------------------------------------------------------------- 47 | 48 | echo "Setting some default parameters" 49 | 50 | # Close "System Preferences" windows 51 | osascript -e 'tell application "System Preferences" to quit' 52 | 53 | # FINDER 54 | 55 | # Displaying the Library folder (hidden by default) 56 | chflags nohidden ~/Library 57 | 58 | # Displaying the sidebar 59 | defaults write com.apple.finder ShowStatusBar -bool true 60 | 61 | # Default display in column mode 62 | # Flwv ▸ Cover Flow View 63 | # Nlsv ▸ List View 64 | # clmv ▸ Column View 65 | # icnv ▸ Icon View 66 | defaults write com.apple.finder FXPreferredViewStyle -string "clmv" 67 | 68 | # Show access path 69 | defaults write com.apple.finder ShowPathbar -bool true 70 | 71 | # Display all file extensions 72 | sudo defaults write NSGlobalDomain AppleShowAllExtensions -bool true 73 | 74 | # Show home folder as default in new Finder windows 75 | defaults write com.apple.finder NewWindowTarget -string "PfHm" 76 | defaults write com.apple.finder NewWindowTargetPath -string "file://${HOME}/" 77 | 78 | # Delete duplicates in the "Open with..." menu 79 | /System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -r -domain local -domain system -domain user 80 | 81 | # Search in current folder by default 82 | defaults write com.apple.finder FXDefaultSearchScope -string "SCcf" 83 | 84 | # Full save window by default 85 | defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode -bool true 86 | 87 | # Full print window by default 88 | defaults write NSGlobalDomain PMPrintingExpandedStateForPrint -bool true 89 | 90 | # Save to disk (not iCloud) by default 91 | defaults write NSGlobalDomain NSDocumentSaveNewDocumentsToCloud -bool false 92 | 93 | # Text selection in Quick Look 94 | defaults write com.apple.finder QLEnableTextSelection -bool true 95 | 96 | # Do not alert if file extension is modified 97 | defaults write com.apple.finder FXEnableExtensionChangeWarning -bool false 98 | 99 | # No creation of .DS_STORE files on network and external disks 100 | defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true 101 | defaults write com.apple.desktopservices DSDontWriteUSBStores -bool true 102 | 103 | # Remove application quarantine alert 104 | # defaults write com.apple.LaunchServices LSQuarantine -bool false 105 | 106 | ## DOCK 107 | 108 | # Minimum size 109 | defaults write com.apple.dock tilesize -int 32 110 | 111 | # Active magnification 112 | defaults write com.apple.dock magnification -bool true 113 | 114 | # Maximum size for magnification 115 | defaults write com.apple.dock largesize -float 128 116 | 117 | # Accelerated opening 118 | defaults write com.apple.dock autohide-delay -float 0 119 | defaults write com.apple.dock autohide-time-modifier -float 0.4 120 | 121 | ## MISSION CONTROL 122 | 123 | # No organization of desktops according to open apps 124 | defaults write com.apple.dock mru-spaces -bool false 125 | 126 | # Password requested immediately when screen saver activates 127 | defaults write com.apple.screensaver askForPassword -int 1 128 | defaults write com.apple.screensaver askForPasswordDelay -int 0 129 | 130 | ## ACTIVE CORNERS 131 | 132 | # 0: no-op 133 | # 2: Mission Control 134 | # 3: Show application windows 135 | # 4: Desktop 136 | # 5: Start screen saver 137 | # 6: Disable screen saver 138 | # 7: Dashboard 139 | # 10: Put display to sleep 140 | # 11: Launchpad 141 | # 12: Notification Center 142 | 143 | # Top left: desktop 144 | # defaults write com.apple.dock wvous-tl-corner -int 4 145 | # defaults write com.apple.dock wvous-tl-modifier -int 0 146 | 147 | # Top right: screensaver 148 | defaults write com.apple.dock wvous-tr-corner -int 5 149 | defaults write com.apple.dock wvous-tr-modifier -int 0 150 | 151 | # Bottom left: application windows 152 | # defaults write com.apple.dock wvous-bl-corner -int 3 153 | # defaults write com.apple.dock wvous-bl-modifier -int 0 154 | 155 | # Bottom right: Mission Control 156 | # defaults write com.apple.dock wvous-br-corner -int 2 157 | # defaults write com.apple.dock wvous-br-modifier -int 0 158 | 159 | ## KEYBOARD AND TRACKPAD 160 | 161 | # Enable full keyboard access for all controls (enable Tab in modal dialogs) 162 | sudo defaults write NSGlobalDomain AppleKeyboardUIMode -int 3 163 | 164 | # Disable press-and-hold for keys in favor of key repeat 165 | sudo defaults write -g ApplePressAndHoldEnabled -bool false 166 | 167 | # Set fast keyboard repeat rate 168 | sudo defaults write NSGlobalDomain KeyRepeat -int 1 169 | sudo defaults write NSGlobalDomain InitialKeyRepeat -int 10 170 | 171 | # Enable tap to click on Trackpad 172 | sudo defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad Clicking -bool true 173 | sudo defaults write NSGlobalDomain com.apple.mouse.tapBehavior -int 1 174 | 175 | # To drag a window from anywhere, not just the top bar, with ^ + Cmd 176 | defaults write -g NSWindowShouldDragOnGesture -bool true 177 | 178 | ## APPS 179 | 180 | # Check availability of updates daily 181 | defaults write com.apple.SoftwareUpdate ScheduleFrequency -int 1 182 | 183 | # Check for updates automatically 184 | sudo defaults write /Library/Preferences/com.apple.SoftwareUpdate AutomaticCheckEnabled -bool true 185 | 186 | # Safari: enable the Develop menu and the Web Inspector 187 | defaults write com.apple.Safari IncludeDevelopMenu -bool true 188 | defaults write com.apple.Safari WebKitDeveloperExtrasEnabledPreferenceKey -bool true 189 | defaults write com.apple.Safari "com.apple.Safari.ContentPageGroupIdentifier.WebKit2DeveloperExtrasEnabled" -bool true 190 | 191 | # Safari: show the status bar 192 | defaults write com.apple.safari ShowOverlayStatusBar -int 1 193 | 194 | # Safari: show the full URL in the address bar (note: this will still hide the scheme) 195 | defaults write com.apple.safari ShowFullURLInSmartSearchField -int 1 196 | 197 | # Safari: do not track 198 | defaults write com.apple.safari SendDoNotTrackHTTPHeader -int 1 199 | 200 | # Safari: show bookmarks bar by default 201 | defaults write com.apple.Safari ShowFavoritesBar -bool true 202 | 203 | # Disable back gesture 204 | defaults write com.google.Chrome AppleEnableSwipeNavigateWithScrolls -bool FALSE 205 | defaults write org.mozilla.firefox AppleEnableSwipeNavigateWithScrolls -bool FALSE 206 | defaults write com.apple.Safari AppleEnableSwipeNavigateWithScrolls -bool FALSE 207 | 208 | # Photos: no display for iPhones 209 | defaults -currentHost write com.apple.ImageCapture disableHotPlug -bool YES 210 | 211 | # TextEdit: .txt as default extension 212 | defaults write com.apple.TextEdit RichText -int 0 213 | 214 | # TextEdit: open and save files in UTF-8 215 | defaults write com.apple.TextEdit PlainTextEncoding -int 4 216 | defaults write com.apple.TextEdit PlainTextEncodingForWrite -int 4 217 | 218 | ## iTerm2: do not display a closing alert 219 | defaults write com.googlecode.iterm2 PromptOnQuit -bool false 220 | 221 | ## SOUND 222 | 223 | # Silent start 224 | sudo nvram SystemAudioVolume="%00" 225 | 226 | # Audible alerts when the volume is changed 227 | sudo defaults write com.apple.systemsound com.apple.sound.beep.volume -float 1 228 | 229 | ## IMAGES 230 | 231 | # Save screenshots in PNG format (other options: BMP, GIF, JPG, PDF, TIFF) 232 | defaults write com.apple.screencapture type -string "png" 233 | 234 | # Enable shadows in screenshots 235 | defaults write com.apple.screencapture disable-shadow -bool false 236 | 237 | # Saving screenshots to the Downloads folder 238 | defaults write com.apple.screencapture location -string "$HOME/Downloads" 239 | 240 | # ----------------------------------------------------------------------------- 241 | # Other configurations 242 | # ----------------------------------------------------------------------------- 243 | 244 | echo "dnsmasq configuration" 245 | # http://passingcuriosity.com/2013/dnsmasq-dev-osx/ 246 | if [ ! -e "/usr/local/etc/dnsmasq.conf" ]; then 247 | echo 'address=/.test/127.0.0.1' >> $(brew --prefix)/etc/dnsmasq.conf 248 | sudo brew services start dnsmasq 249 | fi 250 | 251 | # Change npm's config so it uses ^ (minor versions) by default when saving dependencies 252 | echo "npm configuration" 253 | npm config set save-prefix '^' 254 | 255 | echo "git configuration" 256 | git config --global init.defaultBranch main 257 | 258 | echo "Restarting Finder and Dock. You'll need to restart the computer to complete." 259 | killall Dock 260 | killall Finder 261 | 262 | echo "Cleaning…" 263 | brew cleanup 264 | rm -f -r /Library/Caches/Homebrew/* 265 | 266 | echo "" 267 | echo "ET VOILÀ !" 268 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "{}" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright {yyyy} {name of copyright owner} 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | --------------------------------------------------------------------------------