osx-lion

tracking file renaming/deleting with FSEvents on Lion

送分小仙女□ 提交于 2019-12-18 12:58:20
问题 I'm trying to use FSEvents to detect when files were added/removed from a specific folder. For the moment, I implemented a simple wrapper around FSEvents, and it works fine : I get all the events. BUT the problem I have now is that when I rename a file in the Finder, I catch 2 distinct events : the first one of type "renamed" with the old file name, and another one with "renamed" and the new filename. The event ids are different between both calls. So, how am I supposed to know which "renamed

Permission denied error when trying to install pip in Mac OS X Lion

最后都变了- 提交于 2019-12-18 12:57:10
问题 I'm trying to install pip on a Mac (OS X Lion). It doesn't seem to work. I use sudo and prompted for password. $ sudo curl https://raw.github.com/pypa/pip/master/contrib/get-pip.py | python % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 85929 100 85929 0 0 63833 0 0:00:01 0:00:01 --:--:-- 99339 Downloading/unpacking pip Downloading pip-1.2.tar.gz (94Kb): 94Kb downloaded Running setup.py egg_info for package pip warning: no files found

Change the wallpaper on all desktops in OS X 10.7 Lion?

限于喜欢 提交于 2019-12-18 12:57:05
问题 I would like to change the wallpaper of all desktops (formerly "spaces") on a screen. As of OS X 10.6 there is a category to NSWorkspace which allows the setting of the wallpaper, however, when I use this function only the wallpaper of the current desktop gets changed and all the other desktops remain unchanged. I then looked at the desktop preferences plist and wrote a class that modifies it to reflect the changes I want (basically set a new image file path). After the new file was saved I

Osx Lion: Xcode 4.1 how do I setup a c++0x project

梦想的初衷 提交于 2019-12-18 12:35:36
问题 I know there have been other questions like that but (i.e. Can I use C++11 with Xcode?) but mostly related to older versions of Osx or xcode so they don't really seem to be the right solution to go on Osx Lion and xcode 4.1. What are the requirements on osx Lion to use c++0x features? I think i'd have to set LLVM 3.0 as the compiler somehow using the new libc++ as the standard library. Is there a default way to get LLVM 3.0 to work on lion? Edit : Okay it seems its just a matter of time till

How do you install (build) Ruby 1.9.3 on OSX Lion?

孤街浪徒 提交于 2019-12-18 10:44:55
问题 I've been working on installing Ruby on my mac, OSX Lion. I've installed XCode, GCC, Readline, Homebrew, and JewleryBox, but I have no idea what's going on. Any pointers? Here's what my terminal says? hugo-pc:ruby-1.9.3-p125 squantowalks$ rvm install 1.9.3 Fetching yaml-0.1.4.tar.gz to /Users/squantowalks/.rvm/archives Extracting yaml-0.1.4.tar.gz to /Users/squantowalks/.rvm/src Error running 'tar xmzf /Users/squantowalks/.rvm/archives/yaml-0.1.4.tar.gz -C /Users/squantowalks/.rvm/src ',

commands not found on zsh

微笑、不失礼 提交于 2019-12-18 10:10:07
问题 I am using the z Shell ( zsh ) instead of the default bash, and something wrong happen so that all commands who used to work are no longer recognized: ls zsh: command not found: ls open -e .zshrc zsh: correct 'open' to '_open' [nyae]? I don't know how to reset zsh or how to fix this. Here is the content of $PATH variable: echo $PATH /Users/Malloc/bin/Sencha/Cmd/3.1.2.342:/usr/local/bin/mate I cannot open the .bash_profile file nor .zshrc file, seems the only solution is to reset the zsh . Any

How do I install imagemagick with homebrew?

自作多情 提交于 2019-12-18 09:55:20
问题 I'm trying to install Imagemagick on OSX Lion but something is not working as expected. -> brew install imagemagick /usr/local/git/bin/git ==> Cloning https://github.com/adamv/ImageMagick.git Cloning into /Users/klebershimabuku/Library/Caches/Homebrew/imagemagick--git... fatal: https://github.com/adamv/ImageMagick.git/info/refs not found: did you run git update-server-info on the server? Error: Failure while executing: git clone --depth 1 https://github.com/adamv/ImageMagick.git /Users/kleber

Handshake failure with “SSL error code -1/1/336032856” on OS X 10.7

只谈情不闲聊 提交于 2019-12-18 05:57:30
问题 svn co "https://example.com/svn" svn: OPTIONS of 'https://example.com/svn': SSL handshake failed: SSL error code -1/1/336032856 (https://example.com) It works on Windows and Mac OX10.6, but it fails on Mac OSX10.7. I've tried with the default /usr/bin/svn (version 1.6.16 (r1073529)), and the one of fink /sw/bin/svn (version 1.6.17 (r1128011)) I installed all OSX10.7 updates. What can be the problem? ps: I use a private svn repository; "https://example.com/svn" is just an example for this post

Mac OSX Lion and Ruby - [FATAL] failed to allocate memory

余生颓废 提交于 2019-12-18 05:45:16
问题 I have serious problem with Ruby and OSX Lion - whenever I try to start Rails or even a rake tool I am getting this error: [FATAL] failed to allocate memory I tried recompilling ruby in different versions (1.9.2-p180, 1.9.2-p290, 1.9.2-head) and its always the same. However I noticed that I can remove some gems and then "rake" tool will work and only 'rails s' will die with that error. It seems like there is in fact not enough memory for this amount of gems I am using, but again this seems

Setting up SDL on Mac OS X Lion with Xcode 4

旧城冷巷雨未停 提交于 2019-12-18 04:54:18
问题 I've been trying to get a super simple SDL program to work. I'm using Mac OS X Lion. I've got SDL to work in Snow Leopard, but it doesn't seem to want to work in lion. So far I have this: #include <iostream> #include "SDL/SDL.h" using namespace std; /* #ifdef main # undef main #endif */ int main( int argc, char* args[] ) { SDL_Surface* hello = NULL; SDL_Surface* screen = NULL; SDL_Init( SDL_INIT_EVERYTHING ); screen = SDL_SetVideoMode( 640, 480, 32, SDL_SWSURFACE ); hello = SDL_LoadBMP(