Mac OS X Archives

  1. Fix Python graph-tool “couldn’t recognise svg” Problem

    After I had installed graph-tool and gtk+3 via homebrew and tried to run a graph-tool demo, I came across the following problem:

    I then did a little bit Googling and found out that this was caused by a lack of SVG lib ‘librsvg’ for homebrew’s gtk installation. However, a simple homebrew installation of that lib didn’t fix Continue reading...

  2. How to Set a Key Binding in Sublime Text Based on the File Type the Command Is Running on

    In my Sublime Text 3, I use JsFormat to format my javascript source code. Its key binding follows:

    I have noticed that the JsFormat used the selector context operand to make sure that the js_format command would only run on file types “.js”, “.json” or “.html”. This is to avoid key clashes with other Continue reading...