osx

How to share clipboard between tmux/vim and osx

I found solution for iterm+vim here -> http://stackoverflow.com/questions/677986/vim-copy-selection-to-os-x-clipboard Now i use fakeclip, and it work in vim directly, but not when i use tmux to split terminal window. ...

python-config ldflags on mac

I have a problem with python-config --ldflags on OS X 10.6.2. Using my non-system python.org python install: robin-mbp:~ robince$ which python /Library/Frameworks/Python.framework/Versions/2.5/bin/python robin-mbp:~ robince$ python-config --ldflags -L/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/config -ldl -lpython2....

Anyone had success using a specific locale for a PostgreSQL database so that text comparison is case-insensitive?

I'm developing an app in Rails on OS X using PostgreSQL 8.4. I need to setup the database for the app so that standard text queries are case-insensitive. For example: SELECT * FROM documents WHERE title = 'incredible document' should return the same result as: SELECT * FROM documents WHERE title = 'Incredible Document' Just...

NSSavePanel: Squelching the "confirm replace?" dialog

In the Nav Services world one could specify kNavDontConfirmReplacement as an option to create a NavDialogRef that would not ask the user to confirm the replacement of a file when saving with a file name that already exists. How do I specify an equivalent behavior with the Cocoa NSSavePanel? ...

mdfind used for creating symlinks not working as expected.

I am trying to use the output from 'mdfind' to create a bunch of symlinks. Output of 'mdfind' is like this: /pathtofile1/ /pathtofile2/ /pathtofile3/ So, I used 'sed' to add 'ln -s ' to the start of each line, and awk {print $0 "/directory where I want this/"}; after my single-line script successfully outputs this: ln -s "...

Avoiding TIME_WAIT

I'm trying to avoid TIME_WAIT in a client. I connect and then set O_NONBLOCK and SO_REUSEADDR. I call read until it returns 0. When read returns 0, the errno is also 0. I interpreted this as a sign that the server closed the connection. However, if I call close, the socket is set to TIME_WAIT, as confirmed by netstat. Since I make ...

Mac OS X options for running a Ruby file in the background repeatedly

I wrote a Ruby script that I want to run in the background repeatedly as long as the computer is running. I was planning on using GeekTool to get this .rb file to run in the background, but I'm having issues seen here using GeekTool to run my script. The thing is that I want this script to be a complete surprise (it's a message display...

Editing assembly on Mac OS X

I'm currently disassembling a Mach-O executable(the executable runs on Mac OS X, to be specific) in IDA Pro on windows. I have one instruction which I want to change, but it doesn't seem that IDA Pro allows you to do this. So, I tried using otool on OS X to dump the assembly(which it does fine). However, after editing the assembly in oto...

using packagemaker on mac os

Hello, i want to make the installation package on the mac os of my java application using the package maker. is there any one having the link that will show step by step guidance for performing this. ...

Better bail behavior in face of bug, Mac OS development

When I'm writing a program for the iPhone, what the apple environment does when something goes wrong (from "unrecognized selector" to anything else), the app crashes and at the console, I have this meaningless stack debug spew that looks like this: 2009-12-19 11:57:37.843 ModelsProg[394:207] Stack: ( 30884955, 2431960329, 3...

Accessing main program global variables from a dlopen()ed dynamic library in C on OS X

I am maintaining a small application that has some plugin-like functionality, which is implemented through runtime-loaded dynamic modules. Specifically, since it's a Gtk+ app, I'm using gmodule, but the question applies to dlfcn.h / dlopen() based dynamic library loading just as well. My main program has a single, global struct variab...

Hunchentoot 1.0 returns only empty responses

I'm using an Intel Mac with Mac OS 10.5 and SBCL 1.0.29. I've done pre-1.0 Hunchentoot development here before, so I've had that installed (via asdf-install). Recently I started a new project, and decided I'd start from Hunchentoot 1.0. I asdf-install'ed Hunchentoot, and it seemed to install 1.0 (and deps) just fine. I can load it in...

Table view not updating according to bindings - Part Deux

Title borrowed from this question, of which this one is not a duplicate. See my answer there for what was wrong for that questioner; I'm the author of that answer, and my problem is not that one. I have a table view with three columns, whose Value bindings are bound to three properties of the arrangedObjects of an array controller. The ...

how do I add a python module on MacOS X?

I'm trying to use pywn, a python library for using WordNet. I've played about with python a little under Windows, but am completely new at MacOS X stuff. I'm running under MacOS 10.5.8, so my default Python interpreter is 2.5.1 The pywn instructions say: "Put each of the .py files somewhere in your python search path." Where is the pyt...

how can i send a keyboard event to the app through pressing a button?

in fact i am building a virtual keyboard how can i send a keyboard event to the program through pressing a button? thanks ...

How to simulate a low level keypress on os x?

Howdy, I am trying to generate keyboard keydown and keyup events programmatically. I am currently using CGPostKeyboardEvent to do this, but I am searching for a way to do this at a lower level. I have looked at DDHidLib but could not figure out a way to create a fake event. Can anyone help? update: Thanks to weichsel's advice I am...

How to Wrap a Commad Line Executable In a .app Package?

I wrote an OpenGL+GLUT game for Mac OS X that's currently launched through the command line. I'd like to make opening the game more user-friendly by putting it into a .app package, so regular users would be able to open the game like any other program. What's the best way to do this? ...

drawing in other processes windows on macosx?

Is it possible to draw in other processes windows on MacOSX using Cocoa or other libraries? If yes, are there any samples? Alternatively a quick summary of what i'd have to do? (I need to support at least OSX 10.5) Shared memory is of course a possible solution, but i'd prefer direct drawing to avoid synchronization overhead and code ...

What is the quickest ay to enable fulltext support for Sqlite 3 on OS X?

Sqlite comes installed with OS X Developer Tools. What is the quickest/best way to upgrade or rebuild the default binary to support Sqlite's fulltext features? ...

How to start Mac OS X password screen

I am building an application in Mac OS X which should bring up the password screen in Mac OS X once when a button on a QT WIndow is clicked. Which API I should use for this? Also, how will my application get notified whether system is locked or not? Thanks in advance. ...