If you've added a second hard drive to your Macbook and are finding that it spins up too often/long (i.e. noisy, eats battery)
sudo pmset -a disksleep 1
Note: you can now configure this simply in iTerm2's application settings. Go to Preferences > Appearance > System and select "Exclude from Dock and ⌘-Tab Application Switcher".
On my dual-drive MacBook Pro I have remapped the eject key to F13 using Karabiner and NoEjectDelay. The eject key has been assigned as the hotkey for a guake-style visor terminal using iTerm2. Having its own hotkey precludes the need for an icon, so I prefer to hide the iTerm dock icon.
/usr/libexec/PlistBuddy -c 'Add :LSUIElement bool true' /Applications/iTerm.app/Contents/Info.plist
####Create a shortcut so we can launch Sublime Text from the terminal:
ln -s /Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl /usr/local/bin/subl
Now you can open a file with subl myfile.py
or start a new project in the current directory with subl .
####Create a shortcut so we can launch MacDown from the command line:
ln -s /Applications/MacDown.app/Contents/SharedSupport/bin/macdown /usr/local/bin/macdown
Now you can open a Markdown file with macdown myfile.md
or start a new project in the current directory with macdown .
####Remove custom icon from folder your_folder:
cd your_folder; rm Icon$'\r'
After executing this command, the operating system should immediately restore the default folder icon.
####Example usage:
####First - reset LaunchPad:
defaults write com.apple.dock ResetLaunchPad -bool true; killall Dock
####Second - rebuild the database:
rm ~/Library/Application\ Support/Dock/*.db; killall Dock
###While this script does concatenate pdf files, I haven't yet figured out in which order it does so. On a sample of 19 pdf files, logically named 01something.pdf, 02something.pdf, 03something.pdf, etc. the order of the merged product seemed almost random...
...from Tiger onwards, OSX ships with a Python script that concatenates pdf files (merges them together). The script is already executable, and Python is pre-installed on OS X, so all you need to do is point it at your pdf files and run
"/System/Library/Automator/Combine PDF Pages.action/Contents/Resources/join.py" -o PATH/TO/YOUR/MERGED/FILE.pdf /PATH/TO/ORIGINAL/1.pdf /PATH/TO/ANOTHER/2.pdf /PATH/TO/A/WHOLE/DIR/*.pdf
I prefer putting the link in /usr/local/bin, as it is in the $PATH and therefore I can run the command from anywhere. To set up the link, you need to navigate to the directory where you want the link.
There are two ways - the first way is just one command run plainly in front of you; the second one runs in the background and in a different instance so you can get out of your ssh session and it will continue.
First make a folder to download the websites to and begin your downloading: (note if downloading www.SOME_WEBSITE.com
, you will get a folder like this: /websitedl/www.SOME_WEBSITE.com/
)
# This script prevents Spotify's Auto-updating on OS X (tested on OS X 10.10.3 with Spotify 1.0.3.101.gbfa97dfe) | |
# Based on this tutorial: | |
# http://supraliminal.net/blog/2013/4/21/how-to-revert-back-to-the-older-better-spotify-client | |
# | |
# This script must be run as root: | |
# sudo sh doNotUpdateSpotify.sh | |
# | |
FILE="/tmp/out.$$" | |
if [ "$(id -u)" != "0" ]; then |
#!/bin/bash | |
# #download dmg | |
# curl -LOC - http://foo.bar/file.ext | |
# #mount | |
# hdiutil mount ~/Chromium_OSX_42.0.2311.152.dmg | |
# #copy the app |