diff --git a/sheets/caffeinate b/sheets/caffeinate new file mode 100644 index 0000000..516b892 --- /dev/null +++ b/sheets/caffeinate @@ -0,0 +1,12 @@ + + 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 + + diff --git a/sheets/carthage b/sheets/carthage new file mode 100644 index 0000000..5733662 --- /dev/null +++ b/sheets/carthage @@ -0,0 +1,21 @@ + + carthage + + A dependency management tool for Cocoa applications. + + - Download the latest version of all dependencies mentioned in Cartfile, and build them: + carthage update + + - Update dependencies, but only build for iOS: + carthage update --platform ios + + - Update dependencies, but don't build any of them: + carthage update --no-build + + - Download and rebuild the current version of dependencies (without updating them): + carthage bootstrap + + - Rebuild a specific dependency: + carthage build dependency + + diff --git a/sheets/devfsadm b/sheets/devfsadm new file mode 100644 index 0000000..52ca9e8 --- /dev/null +++ b/sheets/devfsadm @@ -0,0 +1 @@ +Page not found. Updating cache .. diff --git a/sheets/diskutil b/sheets/diskutil new file mode 100644 index 0000000..060d7aa --- /dev/null +++ b/sheets/diskutil @@ -0,0 +1,18 @@ + + diskutil + + Utility to manage local disks and volumes. + + - List all currently available disks, partitions and mounted volumes: + diskutil list + + - 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 + + diff --git a/sheets/ditto b/sheets/ditto new file mode 100644 index 0000000..31692a7 --- /dev/null +++ b/sheets/ditto @@ -0,0 +1,15 @@ + + ditto + + Copy files and folders. + + - Overwrite contents of destination folder with contents of source folder: + ditto path/to/source path/to/destination + + - Print a line to the Terminal window for every file that’s being copied: + ditto -V path/to/source path/to/destination + + - Copy a given file or folder, while retaining the original file permissions: + ditto -rsrc path/to/source path/to/destination + + diff --git a/sheets/drutil b/sheets/drutil new file mode 100644 index 0000000..ea0ea40 --- /dev/null +++ b/sheets/drutil @@ -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 + + diff --git a/sheets/eject b/sheets/eject new file mode 100644 index 0000000..8884050 --- /dev/null +++ b/sheets/eject @@ -0,0 +1,19 @@ +# eject +# eject removable media +# You can also close the tray using certain options. + +# Eject any available device +# CD-ROM, floppy disk, tape, or JAZ or ZIP disk +eject + +# Eject a device by its name +eject /dev/cdrom + +# Close the tray using eject command +eject -t + +# Lock the hardware eject button +eject -i on + +# Unlock the hardware eject button +eject -i off diff --git a/sheets/look b/sheets/look new file mode 100644 index 0000000..80fd8e8 --- /dev/null +++ b/sheets/look @@ -0,0 +1,12 @@ + + look + + Look for lines in sorted file. + + - Look for lines which begins with the given prefix: + look prefix file + + - Look for lines ignoring case: + look -f prefix file + + diff --git a/sheets/pmset b/sheets/pmset new file mode 100644 index 0000000..bb3ba45 --- /dev/null +++ b/sheets/pmset @@ -0,0 +1,28 @@ + + pmset + + Configure macOS power management settings, as one might do in System Preferences > Energy Saver. + Commands that modify settings must begin with sudo. + + - Display the current power management settings: + pmset -g + + - Display the current power source and battery levels: + pmset -g batt + + - Set display to never sleep when on charger power: + sudo pmset -c displaysleep 0 + + - Set display to sleep after 15 minutes when on battery power: + sudo pmset -b displaysleep 15 + + - Schedule computer to automatically wake up every weekday at 9 AM: + sudo pmset repeat wake MTWRF 09:00:00 + + - Restore to system defaults: + sudo pmset -a displaysleep 10 disksleep 10 sleep 30 womp 1 + + +See also: sudo + + diff --git a/sheets/prctl b/sheets/prctl new file mode 100644 index 0000000..52ca9e8 --- /dev/null +++ b/sheets/prctl @@ -0,0 +1 @@ +Page not found. Updating cache .. diff --git a/sheets/say b/sheets/say new file mode 100644 index 0000000..99ae000 --- /dev/null +++ b/sheets/say @@ -0,0 +1,21 @@ + + say + + Converts text to speech. + + - Say a phrase aloud: + say "I like to ride my bike." + + - Read a file aloud: + say -f filename.txt + + - Say a phrase with a custom voice and speech rate: + say -v voice -r words_per_minute "I'm sorry Dave, I can't let you do that." + + - List the available voices: + say -v ? + + - Create an audio file of the spoken text: + say -o filename.aiff "Here's to the Crazy Ones." + + diff --git a/sheets/svgo b/sheets/svgo new file mode 100644 index 0000000..dd9303f --- /dev/null +++ b/sheets/svgo @@ -0,0 +1,31 @@ + + svgo + + SVG Optimizer: a Nodejs-based tool for optimizing Scalable Vector Graphics files. + It applies a series of transformation rules (plugins), which can be toggled individually. + + - Optimize a file using the default plugins (overwrites the original file): + svgo test.svg + + - Optimize a file and save the result to another file: + svgo test.svg test.min.svg + + - Optimize all SVG files within a folder (overwrites the original files): + svgo -f path/to/folder/with/svg/files + + - Optimize all SVG files within a folder and save the resulting files to another folder: + svgo -f path/to/input/folder -o path/to/output/folder + + - Optimize SVG content passed from another command, and save the result to a file: + cat test.svg | svgo -i - -o test.min.svg + + - Optimize a file and print out the result: + svgo test.svg -o - + + - Optimize a file making sure a given plugin is enabled: + svgo --enable=plugin_name + + - Show available plugins: + svgo --show-plugins + + diff --git a/sheets/wacaw b/sheets/wacaw new file mode 100644 index 0000000..00c76bd --- /dev/null +++ b/sheets/wacaw @@ -0,0 +1,21 @@ + + wacaw + + A little command-line tool for Mac OS X that allows you to capture both still pictures and video from an attached camera. + + - Take a picture from webcam: + wacaw filename + + - Record a video: + wacaw --video filename -D duration_in_seconds + + - Take a picture with custom resolution: + wacaw -x width -y height filename + + - Copy image just taken to clipboard: + wacaw --to-clipboard + + - List the devices available: + wacaw -L + +