Set default web browser via command line?

I found this tool. After installing it, you can do this: defaultbrowser chrome Here’s the entire source-code in case the link 404s in the future. It is licensed under the MIT license with Copyright (c) 2014 Margus Kerma. #import <Foundation/Foundation.h> #import <ApplicationServices/ApplicationServices.h> NSString* app_name_from_bundle_id(NSString *app_bundle_id) { return [[app_bundle_id componentsSeparatedByString:@”.”] lastObject]; } NSMutableDictionary* get_http_handlers() { NSArray … Read more

How can I install Ruby 1.9.3 in Mac OS X Mountain Lion without Xcode?

osx-gcc-installer turns out to be a very good option to replace Xcode in order to install Ruby 1.9.3 These are the steps I have followed: Download & install the latest version of osx-gcc-installer here (GCC-10.7-v2 is fine): https://github.com/kennethreitz/osx-gcc-installer Install RVM as usual and select 1.9.3-head as the default ruby installation: https://rvm.io/rvm/install/ Install Homebrew: https://github.com/mxcl/homebrew/wiki/installation Install … Read more

jdk 6 on mountain lion

As I recall, the first time you do something that needs Java the OS will ask if you want to install it, and version 6 is what you get. According to this page, typing java -version in the Terminal is enough to trigger the prompt. For the JDK (and not the runtime), you’ll need to … Read more

OS X Mountain Lion: gcc-4.2 No such file or directory

If you have Xcode installed, gcc should be available. Check where it is with: kamil$ which gcc /usr/bin/gcc Then make a user-land symbolic link from gcc-4.2 to plain gcc: kamil$ sudo ln -s ~/bin/gcc /usr/bin/gcc-4.2 (Ensure the user-land bind folder is in your path via export PATH=…:$HOME/bin in your .bash_profile or .zshrc.) Gem installed fine … Read more

Disable Anti-Aliasing Fonts in Xcode 4.4 in Mountain Lion

From the Release Notes: https://developer.apple.com/library/content/releasenotes/DeveloperTools/RN-Xcode/Chapters/Introduction.html#//apple_ref/doc/uid/TP40001051-CH1-SW680 Text and font rendering on OS X v10.8 is optimized for Retina display. On a non–Retina display running OS X v.10.8, some font configurations can appear blurry in Xcode. 11486875 Switch back to non–Retina display optimized text and font appearance in Xcode by enterin this command in Terminal: defaults write … Read more

Annoying message when opening windows from Python on OS X 10.8

The correct command to run is: defaults write org.python.python ApplePersistenceIgnoreState NO This message appears due to the “application resume” feature in newer versions of OS X. Clearly, this isn’t a useful feature for most Python programs (in my case, plotting data with matplotlib), so we can just turn it off with the above command. For … Read more

Error Installing Homebrew – Brew Command Not Found [duplicate]

The warning is telling you what is wrong. The problem is that brew is kept in /usr/local/bin So, you can try /usr/local/bin/brew doctor To fix it permanently alter your bash profile (.bashrc or .profile in your home directory) and add the following line: export PATH=/usr/local/bin:$PATH On Apple silicone it’s export PATH=/opt/homebrew/bin/:$PATH

Why does PDFKit/wkhtmltopdf hang but renders PDF as expected when Rails app is killed?

The problem is with wkhtmltopdf itself, specifically, any version after 0.9.9. wkhtmltopdf hangs when run directly from the command-line. Steps to correct: brew uninstall wkhtmltopdf cd /usr/local/Library/Formula/ git checkout 6e2d550 /usr/local/Library/Formula/wkhtmltopdf.rb brew install wkhtmltopdf Then verify the correct version is installed wkhtmltopdf –version which should yield wkhtmltopdf 0.9.9 Citations: https://github.com/mileszs/wicked_pdf/issues/110 http://wearepandr.com/blog/article/homebrew-and-installing-old-package-versions#blog_nav