This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
brew install smartmontools | |
# launch selftest in background during regular system operation (~2h) | |
smartctl -c -t long disk0 | |
# get test results from S.M.A.R.T. error log | |
smartctl -l selftest disk0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ sw_vers | |
ProductName: Mac OS X | |
ProductVersion: 10.8.3 | |
BuildVersion: 12D78 | |
$ otool -L /usr/lib/system/libsystem_c.dylib | sed -nE 's/.*libsystem_c.dylib.*current version (.*)\)/\1/p' | |
825.26.0 | |
$ nm /usr/lib/system/libsystem_c.dylib | grep getopt | |
000000000005d624 T _getopt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import os | |
calibre_bin_dir = '/opt/homebrew-cask/Caskroom/calibre/latest/calibre.app/Contents/MacOS' | |
console_bin_dir = '/opt/homebrew-cask/Caskroom/calibre/latest/calibre.app/Contents/console.app/Contents/MacOS' | |
destination_bin_dir = '/Users/stefan/.homebrew/Cellar/calibre/0.9.34/bin' | |
calibre_scripts = [ | |
'lrfviewer', | |
'calibre', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# If not root then update sudo time stamp | |
if [[ $EUID -ne 0 ]]; then | |
sudo -v | |
fi | |
for file in /etc/cups/ppd/*.ppd; do | |
echo "Disabling printer supply check for $file" | |
sudo bash -c "echo -e \"\n*cupsSNMPSupplies: False\" >> $file" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defaults write -g NSAllowContinuousSpellChecking -bool false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
screen -ls | sed -nr 's/\s+([0-9]+).*/\1/p' | xargs kill |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lion_sdk="$HOME/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk" | |
lion_bin="$HOME/Applications/Xcode.app/Contents/Developer/usr/bin" | |
lion_libexec="$HOME/Applications/Xcode.app/Contents/Developer/usr/libexec" | |
lion_llvm="$HOME/Applications/Xcode.app/Contents/Developer/usr/llvm-gcc-4.2/libexec/gcc/i686-apple-darwin11" | |
python_include="$lion_sdk/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7" | |
export C_INCLUDE_PATH="$lion_sdk/usr/include" | |
export LIBRARY_PATH="$lion_sdk/usr/lib" | |
export CPPFLAGS="-I$python_include" | |
export PATH=$HOME/.python/bin:$HOME/Library/Python/2.7/bin:$lion_bin:$lion_libexec:$lion_llvm:$PATH |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defaults write -app Safari AppleLanguages -array en |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt-get install gnome-terminal xterm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
chmod 0000 ~/Applications/Dropbox.app/Contents/Resources/*.tgz |