Total Pageviews

Friday 21 September 2018

关于Mac


MAC OSX 是苹果公司设计开发的一款广受好评的操作系统。如果尝试总结 MAC 与 Windows 最大的差异,或许关键字在于:注意力。无论如何,Mac 为人们创造了一个新的创意环境,值得你去关注与尝试。

目录浏览


from https://github.com/mba811/about-mac
-------

Mac 开发配置学习手册- https://mba811.gitbooks.io/mac-dev/content/

------

OS X command line tools for developers – The ultimate tool to manage your Mac. It provides a huge set of command line commands that automatize the usage of your OS X system.


Mac CLI

 macOS command line tools for developers
⭐️ Now with modularity and plugins! You can check the plugins folder: /mac-cli/plugins
Contributions to add new plugins and keep improving the existing ones are welcome and very much appreciated!
image
The ultimate tool for developers to manage their Mac. It provides a huge set of command line commands that automate the usage of your macOS system. When you run a function, the executed command is displayed and that helps you memorize each of the Utilities for future usage.

Installation in 1 Simple Step - Including configuration wizard!

Via curl
sh -c "$(curl -fsSL https://raw.githubusercontent.com/guarinogabriel/mac-cli/master/mac-cli/tools/install)"
Via wget
sh -c "$(wget https://raw.githubusercontent.com/guarinogabriel/mac-cli/master/mac-cli/tools/install -O -)"
Then, re-open your terminal client. You will be able to run all the commands listed below, for example:
mac help

Configuration

The configuration is done when you install Mac CLI for the first time though the installer configuration wizard. After that, you can update your Mac CLI configuration by editing the following file: /usr/local/bin/mac

Requirements

These are the requirements to be able to run all the commands (the dependencies/requirements are installed when you install Mac CLI for the first time):
  • Homebrew
  • Git
  • Python
  • Pipe Viewer (pv)

Update

You can update Mac CLI to the latest version by running:
sh -c "$(curl -fsSL https://raw.githubusercontent.com/guarinogabriel/mac-cli/master/mac-cli/tools/update)"

Uninstallation

You can uninstall Mac CLI by running:
sh -c "$(curl -fsSL https://raw.githubusercontent.com/guarinogabriel/mac-cli/master/mac-cli/tools/uninstall)"

Integrated Projects

The following amazing projects have been integrated on the mac script (all the integrated projects are optional and can be installed through the installation wizard):

Help / Commands List

CommandDescriptionArguments
mac helpList all available commands in mac script

General Commands

CommandDescriptionArguments
mac updateInstall macOS software updates, update installed Ruby gems, Homebrew, npm and their installed packages
mac lockLock
mac restartRestart macOS
mac sleepSleep mode
mac shutdownShutdown
mac presentationPrepare MAC for presentation: minimize all apps, close browsers, send files from desktop and downloads to trash and set not disturb mode
mac timeShow clock at top right position in Terminal/iTerm
mac screensaverStart screensaver
mac folders:listList folders in current directory with their current size
mac folder:sizeCalculate current folder size
mac folders:remove-emptyRemove empty subdirectories
mac apps:close-allClose all opened apps
mac bluetooth:statusGet the bluetooth status
mac bluetooth:enableEnable bluetooth
mac bluetooth:disableDisable bluetooth
mac wifi:statusGet the wifi status
mac wifi:scanScan available wifi networks
mac wifi:enableEnable wifi
mac wifi:disableDisable wifi
mac wifi:passwordGet password for current wifi network
mac dock:add-space NAdd blank space to dockN = number of spaces
mac apps:app-storeGet list of installed apps from App Store
mac eject-allEject all mounted volumes and disks
mac batteryGet battery status
mac infoGet macOS version information
mac hidden:showShow hidden files
mac hidden:hideHide hidden files
mac find:text XFind exact phrase recursively inside directoryX = Text string
mac find:biggest-filesFind biggest files inside directory
mac find:biggest-directoriesFind biggest directories inside directory
mac zip:extract XExtract Zip file to current folderX = Zip file to extract
mac gzip:compress XCompress current file using GzipX = File to compress
mac gzip:extract XExtract Gzip file to current folderX = Gzip file to extract
mac tar:compress XCompress X file/directory using tar with progress indicatorX = File or directory
mac tar:extract XExtract tar file to current folderX = Tar file to extract

Search Utilities

CommandDescriptionArguments
mac find:recent NFind files modified in the last N minutesN = number of minutes
mac find:duplicatedFind duplicated files
mac search:replace XSearch and replace string in fileX = File to perform the search and replace operation

Network Utilities

CommandDescription
mac speedtestInternet connection speed test
mac speedtest:infiniteRun internet speed test each 5 minutes
mac portsList of used ports
mac ip:localGet local IP address
mac ip:publicGet public IP address

LAMP (Linux, Apache, MySQL, PHP) Utilities

CommandDescriptionArguments
mac mysqlOpen Sequel PRO app)
mac mysql:cliStart MySQL CLI with autocompletion and syntax higlighting
mac mysql:listList all MySQL databases
mac mysql:dump-allExport all MySQL databases to individual files
mac mysql:dump XExport MySQL database to current directoryX = database name
mac mysql:import XImport MySQL databaseX = SQL file
mac mysql:import-table XImport single MySQL database tableX = SQL file containing database table
mac mysql:create XCreate MySQL databaseX = Database name
mac mysql:drop XRemove MySQL databaseX = Database name
mac mysql:duplicate XDuplicate MySQL databaseX = Database name
mac mamp:startStart MAMP Server (Apache and MySQL)
mac mamp:stopStop MAMP Server (Apache and MySQL)
mac mamp:restartRestart MAMP Server (Apache and MySQL)
mac php:syntaxCheck PHP Syntax for all PHP files in current location
mac php:infoGet PHP info on command line
mac hosts:editEdit hosts file

SSH Utilities

CommandDescriptionArguments
mac ssh:download-file XDownload file from remote server through SSHX = Path of the remote file to download
mac ssh:download-folder XDownload entire folder from remote server through SSHX = Path of the remote folder to download
mac ssh:download-database XDownload MySQL from remote server through SSHX = Name of the database to download
mac ssh:sync:local XSync local folder with remote folder using rsync through SSH (download remote folder to local folder)X = Path of the remote folder to sync to local folder
mac ssh:sync:remote XSync remote folder with local folder using rsync through SSH (upload local folder to remote folder)X = Path of the remote folder to sync from local folder
mac ssh:upload XUpload file to remote server through SSHX = Path of the file to upload to the remote server
mac ssh:public-keyCopy SSH Public Key
mac ssh:listList all the saved SSH credentials

Web Development Utilities

CommandDescriptionArguments
mac dev:monitor XMonitor file changes (for example: log files)X = File to monitor
mac dev:compass:compileCompile current folder using compass
mac dev:sassCompile current folder using SASS
mac dev:optimize-imagesOptimize all images in current directory and subdirectories
mac dev:css:convert-to-scssConvert CSS file to SCSS

Performance and maintenance Utilities

CommandDescription
mac systemShow system information to review mac performance
mac tempShow temperature, fan and battery statistics
mac memorySee memory usage sorted by memory consumption
mac trash:emptyEmpty trash
mac trash:sizeCalculate trash size
mac desktop:cleanupRemove all files and directories from Desktop directory
mac downloads:cleanupRemove all files and directories from Downloads directory

iTerm / Terminal Utilities

CommandDescription
mac iterm:tab-titleSet title of current iTerm tab

Git Utilities

CommandDescription
mac git:configDisplay local Git configuration
mac git:openOpen current repository on Github
mac git:create:branchCreate branch based on current branch
mac git:branches:dateGet last update date for all branches in current project
mac git:undo-commitUndo latest commit
mac git:logSee latest commits IDs and titles for current branch
mac git:branchSee all branches
mac git:branch:renameRename Git branch
mac git:branch:remove-localRemove local Git branch
mac git:branch:remove-remoteRemove local and remote Git branch
mac git:removeRemove Git from current project
mac git:settingsCheck Git settings
mac git:add-removedAdd removed files to staged files
mac git:sizeGet size for current Git directory

Web Utilities

CommandDescriptionArguments
mac web:download-imagesDownload all images from website to current directory

Homebrew Utilities

CommandDescription
mac brewGet a list of installed Homebrew packages

Xcode Utilities

CommandDescription
mac xcode:cleanupCleanup Xcode files to free up hard disk space

Image Utilities

CommandDescriptionArguments
mac image:generate:mobile-app-icons X YGenerate mobile app iconsX = Original image file, Y = Output path

Magento Utilities

CommandDescription
mac magento:versionGet Magento version from current project on command line
mac magento:customer:createCreate Magento customer with sample address and sample credit card information
mac magento:fix-permissionsFix Magento permissions for files and directories
mac magento:order:createCreate sample order in Magento
mac magento:shell-script:createCreate script in Magento shell folder to be run from command line
mac magento:gitignore:createCreate gitignore file for Magento project
mac magento:url-rewrites:enableEnable Magento URL rewrites
mac magento:url-rewrites:disableDisable Magento URL rewrites
mac magento2:installInstall Magento 2 in current folder

from https://github.com/guarinogabriel/mac-cli

No comments:

Post a Comment