Let's suppose I have a bash script (foo.sh) that in a very simplified form, looks like the following:
echo "hello"
sleep 100 &
ps ax | grep sleep | grep -v grep | awk '{ print $1 } ' | xargs kill -9
echo "bye"
The third line imitates pkill, which I don't have by default on Mac OS X, but you can think of it as the same as pkill. Howeve...
I was trying to hack up a tool to visualize shaders for my game and I figured I would try using python and cocoa. I have ran into a brick wall of sorts though. Maybe its my somewhat poor understand of objective c but I can not seem to get this code for a view I was trying to write working:
from objc import YES, NO, IBAction, IBOutlet
fr...
I'm looking for a way to dump (export) the contents of an OS X keychain into a file that I can easily process elsewhere, such as tab-delimited plaintext or something of the sort.
The Keychain Access app does not offer any such functionality, and getting a key's data involves opening each in turn, and having to type in the keychain's pas...
I've been searching through the Microsoft Silverlight site, and I am guessing the answer to my question will be no.
But is there any non official or official version of the Silverlight development SDK for Mac OS?
I want to avoid installing Windows, but I want to develop in Silverlight.
...
Has anyone spent any time comparing the various Objective C bridges and associated Cocoa wrappers for Mono?
I want to port an existing C# application to run on OS X. Ideally I'd run the application on Mono, and build a native Cocoa UI for it.
I'm wondering which bridge would be the best choice.
In case it's useful to anyone, here ar...
I have writen a small applet in Silverlight and, while it works fine on Windows, it seems that on OSX the data binding part of the application (all those NotifyPropertyChanged calls) do not work. Does anyone know why this is? I've tried under both Firefox and Safari with the latest 2.0 download installed.
...
In a Mac OS X Cocoa application, I have an application-modal dialog with text fields that are bound to the Shared User Defaults Controller. If I edit a text field, and then tab away from it before hitting the OK button, then everything works as desired. However, if I start editing a field, then hit the Return key to trigger OK, the old ...
My server (an XServe xeon 8-core [harpertown arch]) has been spamming kernel warnings lately and I cannot seem to get any concrete information on what may be going wrong. Has anybody encountered such errors before?
thanks in advance,
|K<
Apr 6 13:44:19 xserve kernel[0]: /!\ WARNING: 27006 recoverable class Fbd error(s) ( ferr = 0x3000...
I downloaded an App and it contained an *.rsd file. What's that?
...
How can I programmatically determine which (if any) mounted volumes are a DVD?
I currently look for a directory with permissions 555 but I would prefer something a bit less hacky. Thanks!!
$ ls -l /Volumes/
total 12
dr-xr-xr-x 4 mh gfx 136 Aug 3 2001 DQRMX2102
lrwxr-xr-x 1 root admin 1 Apr 6 15:09 Macintosh HD -> /
drwx...
I am working on an automated backup script. This script needs to download an HTTP resource using a username and password. At the moment, the auth credentials are in cleartext, which is obviously not ideal from a security point of view. I recently discovered the security utility on OS X after reading this blog post. security gives you key...
I am using ipython on Mac OS 10.5 with python 2.5.1 (I would actually like to use ipython for 2.6.1, but it doesn't seem to be available?)
I installed ipython via easy_install. It works but is missing gnu readline (needed for nice searching of command line history with ctrl-R, etc.)
I found a blog post and other sources saying this cou...
Is it possible in MacOS X to send a mouse click to a specific window?
I already managed to send a click to the entire screen via CGPostMouseEvent.
The windows i want to control overlap each other, so my next idea was to bring the proper window to the front before triggering the click. It works but ends in a total mess... ;-)
...
I want to implement my own cursor in an OpenGL / GLUT window. The usual way to do this is to freeze the cursor (so it can't hit the edges of the screen) and keep track of its position yourself. I can make the onscreen cursor invisible using
glutSetCursor(GLUT_CURSOR_NONE);
and then inside of my glutPassiveMotionFunc callback move the...
$ mkdir foo
$ cd foo
$ hg init .
$ hg log
abort: Is a directory
$ hg history
abort: Is a directory
Darwin Host.local 9.6.1 Darwin Kernel Version 9.6.1: Wed Dec 10 10:38:33 PST 2008; root:xnu-1228.9.75~3/RELEASE_I386 i386
$ hg --version
Mercurial Distributed SCM (version 1.2.1)
$ python --version
Python 2.5.4
(all installed via macpo...
I am maintaining a carbon C++ application on OS X. There is a "spin lock" in one of the objects in the code that looks like this,
while ( mState != RELEASED )
{
sleep( 1 );
}
There is a post render maintenance callback that is fed to AudioUnitAddRenderNotify() that would set the mState of these various objects.
I was thinking about ...
I would like to run a script before Firefox starts & after it quits. In Ubuntu I do this by creating a new shortcut that calls my function first, then calls the firefox command, then calls my last function. Since the firefox command blocks until the application quits, my last function is called immediately after the process ends.
Howeve...
Can anyone provide a sample / link to a sample Cocoa app that changes the 'hardware' cursor in a fullscreen OpenGL Cocoa app? I have been able to create a full screen GL app and an app that changes the cursor by overriding NSView::resetCursorRects but I have not been able to get both to work simultaneously. I've also refitted some of t...
Hi,
I had a problem with my MySQL installation here the other day. After doing everything I could think of to no avail, I decided to reinstall the whole thing.
I installed the package format of the installation from mysql.com, and ran the installer. It installed it right where it was before i uninstalled it: /usr/local/mysql.
So I try...
Gitx has a great diff viewer, how do I make git automatically pipe git diff whatever into gitx?
I've tried to set git config diff.external to a shell script that looks like this:
git diff "$2" "$5" | gitx
However, that only opens all the individual files up into multiple gitx windows, and it really messes up the files names (changes ...