Move pages back into a "pages" folder

This commit is contained in:
rprieto
2014-03-04 23:28:29 +11:00
parent 0a4c0f0a37
commit f00bf64426
99 changed files with 0 additions and 0 deletions

15
pages/osx/airport.md Normal file
View File

@@ -0,0 +1,15 @@
# Airport
> Airport utility
- Create a symlink so you can easily run 'airport' without specifying a path.
`sudo ln -s /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport /usr/sbin/airport`
- Scan for available wireless networks
`airport -s`
- Disassociate from current airport network
`sudo airport -z`

27
pages/osx/brew.md Normal file
View File

@@ -0,0 +1,27 @@
# brew
> Package manager for OS X
- Search formula
`brew search {{text}}`
- Install formula
`brew install {{formula}}`
- List installed formulae [with matching name]
`brew list {{[text]}}`
- Get latest version of installed formula (passing no formula updates all installed formulae)
`brew upgrade {{[formula]}}`
- Update brew
`brew update`
- Switch version of formula
`brew switch {{formula}} {{version}}`

13
pages/osx/caffeinate.md Normal file
View File

@@ -0,0 +1,13 @@
# caffeinate
> Prevent a system from sleeping
- Prevent mac from sleeping for 1 hour (3600 seconds)
`caffeinate -u -t 3600`
- Prevent mac from sleeping until a command completes
`caffeinate -s {{command}}`

23
pages/osx/diskutil.md Normal file
View File

@@ -0,0 +1,23 @@
# diskutil
> Utility to manage local disks and volumes
- List all currently available disks, partitions and mounted volumes.
`diskutil list`
- Repair permissions on a volume
`diskutil repairPermissions {{/Volumes/Name}}`
- Repair the file system data structures of a volume
`diskutil repairVolume {{/dev/diskX}}`
- Unmount a volume
`diskutil unmountDisk {{/dev/diskX}}`
- Eject a CD/DVD (unmount first)
`diskutil eject {{/dev/disk1}}`

12
pages/osx/drutil.md Normal file
View File

@@ -0,0 +1,12 @@
# drutil
> Interact with DVD burners
- Eject a disk from the drive
`drutil eject`
- Burn a folder as an ISO9660 filesystem onto a DVD. Don't verify and eject when complete.
`drutil burn -noverify -eject -iso9660`

19
pages/osx/du.md Normal file
View File

@@ -0,0 +1,19 @@
# du
> Estimate file space usage
- get a sum of the total size of a file/folder in human readable units
`du -sh {{file/directory}}`
- list file sizes of a directory and any subdirectories in KB
`du -k {{file/directory}}`
- get recursively, individual file/folder sizes in human readable form
`du -ah {{directory}}`
- list the KB sizes of directories for N levels below the specified directory
`du -k -depth=1 {{directory}}`

13
pages/osx/md5.md Normal file
View File

@@ -0,0 +1,13 @@
# md5
> Calculate MD5 cryptographic checksums
- Calculate the MD5 checksum for file(s) or files in a directory, one checksum per file
`md5 {{filename1}}`
`md5 {{filename1}} {{filename2}}`
`md5 {{directory/\*}}`
- Output only the md5 checksum (no filename)
`md5 -q {{filename}}`

19
pages/osx/networksetup.md Normal file
View File

@@ -0,0 +1,19 @@
# networksetup
> Configuration tool for Network System Preferences
- List available network service providers (Ethernet, Wi-Fi, Bluetooth, etc)
`networksetup -listallnetworkservices`
- Show network settings for a particular networking device
`networksetup -getinfo {{"Wi-Fi"}}`
- Get currently connected Wi-Fi network name (Wi-Fi device usually en0 or en1)
`networksetup -getairportnetwork {{en0}}`
- Connect to a particular Wi-Fi network
`networksetup -setairportnetwork {{en0}} {{"Airport Network SSID"}} {{password}}`

23
pages/osx/open.md Normal file
View File

@@ -0,0 +1,23 @@
# open
> Opens files, directories and applications
- Open a file with the associated application
`open filename.ext`
- Run a graphical MacOSX application
`open /Applications/iTunes.app`
- Open the current directory in Finder
`open .`
- Reveal a file in finder
`open -R /path/dir/file`
- Open all the word docs in the current directory with Microsoft Word
`open *.doc`

12
pages/osx/pbcopy.md Normal file
View File

@@ -0,0 +1,12 @@
# pbcopy
> Place standard output in the clipboard
- Place the contents of a file in the clipboard.
`pbcopy < {{file}}`
- Place the results of a command in the clipboard
`find . -type t -name "*.png" | pbcopy`

12
pages/osx/pbpaste.md Normal file
View File

@@ -0,0 +1,12 @@
# pbpaste
> Send the contents of the clipboard to standard output
- Write the contents of the clipboard to a file.
`pbpaste > {{file}}`
- Use the contents of the clipboard as input to a command.
`pbpaste | grep foo`

11
pages/osx/qlmanage.md Normal file
View File

@@ -0,0 +1,11 @@
# qlmanage
> QuickLook server tool
- displays QuickLook for one or multiple files
`quicklook -p {{filename}} {{filename2}}`
- Compute 300px wide PNG thumbnails of all JPEGs in the current directory and put them in a directory.
`quicklook *.jpg -t -s 300 {{/existing//thumbnail/directory}}`

19
pages/osx/say.md Normal file
View File

@@ -0,0 +1,19 @@
# say
> Uses text to speech to speak through the default sound device
- Speak a phrase aloud
`say "I like to ride my bike."`
- Speak a file aloud
`say -f {{filename}}`
- Create an AAC compressed audio file with the spoken text
`say -o {{filename.m4a}} "Everyone loves iTunes"`
- List the available voices
`say -v '?'`

19
pages/osx/shutdown.md Normal file
View File

@@ -0,0 +1,19 @@
# shutdown
> Shutdown and reboot the system
- Power off (halt) immediately
`shutdown -h now`
- Sleep immediately
`shutdown -s now`
- Reboot immediately
`shutdown -r now`
- Reboot in 5 minutes
`shutdown -r +{{5}}`

12
pages/osx/sw_vers.md Normal file
View File

@@ -0,0 +1,12 @@
# sw_vers
> Print Mac OSX Software versioning information
- Print OSX Version
`sw_vers -productVersion`
- Print OSX Build
`sw_vers -buildVersion`

24
pages/osx/sysctl.md Normal file
View File

@@ -0,0 +1,24 @@
# sysctl
> Access kernel state information
- Show all available variables and their values
`sysctl -a`
- Show Apple model identifier
`sysctl -n hw.model`
- Show CPU model
`sysctl -n machdep.cpu.brand_string`
- Show available CPU features (MMX, SSE, SSE2, SSE3, AES, etc)
`sysctl -n machdep.cpu.feature`
- Set a changeable kernel state variable
`sysctl -w name=value`
`sysctl -w kern.maxfiles=15000`

View File

@@ -0,0 +1,15 @@
# system_profiler
> Report system hardware and software configuration
- Display a full system profiler report which can be opened by System Profiler.app
`system_profiler -xml > MyReport.spx`
- Display a hardware overview (Model, CPU, Memory, Serial, etc)
`system_profiler SPHardwareDataType`
- Print the system serial number
`system_profiler SPHardwareDataType|grep "Serial Number (system)" |awk '{print $4}'`

24
pages/osx/systemsetup.md Normal file
View File

@@ -0,0 +1,24 @@
# systemsetup
> Configure System Preferences machine settings
- Enable remote login (SSH)
`systemsetup -setremotelogin on`
- Specify TimeZone, NTP Server and enable network time
`systemsetup -settimezone {{US/Pacific}}`
`systemsetup -setnetworktimeserver {{us.pool.ntp.org}}`
`systemsetup -setusingnetworktime on`
- Make the machine never sleep; restart on freeze & power failure
`systemsetup -setsleep off`
`systemsetup -setrestartpowerfailure on`
`systemsetup -setrestartfreeze on`
- List valid startup disks, specify a new startup disk
`systemsetup -liststartupdisks`
`systemsetup -setstartupdisk {{path}}`

16
pages/osx/xed.md Normal file
View File

@@ -0,0 +1,16 @@
# xed
> Opens files for editing in XCode
- Open file(s) in XCode
`xed {{file1}}`
`xed {{/path/to/file1}} {{/path/to/file2}}`
- Open file(s) in XCode, create if it doesn't exist
`xed -c {{filename1}}`
- Open a file in XCode and jump to line number 75
`xed -l 75 {{filename}}`