How to move up a directory with Terminal in OSX
Kiddie pool question. When I launch a new Terminal window, I starts me in 'Macintosh HD/Users/MyName'. How can I back out of my user directory back up to the top level? ...
Kiddie pool question. When I launch a new Terminal window, I starts me in 'Macintosh HD/Users/MyName'. How can I back out of my user directory back up to the top level? ...
I'm working on an Automator workflow in which I need to take in a text string, do some processing, and then display it to the user, preferably in a manner similar to Address Book's or Quicksilver's "Display in Large Type", but I haven't found any actions to do this. Does anyone know of any? ...
Hi all, I wonder how I can add mysqldump to my MAMP environment. I googled a bit and found only the community MySQL server version. But I do not want to install another MySQL – basically because I want to save my data first, before any experiment. thx for help in advance (probably it´s just a simple link :) ...
Is there a unix tool to which I can pass a file and have it tell me where the icon for the file is coming from? What I am looking for is something like this: $WhoProvidedIcon /Path/To/file.myex UTI: com.myapplication.document PLIST: /path/to/myapplication.app/Contents/Info.plist ICON: /path/to/myapplication.app/Contents/Resources/B...
Something similar to linux cat /proc/uptime which returns the uptime in seconds, and preferably not parsing uptime(1). ...
I have a build system tool that is using getcwd() to get the current working directory. That's great, except that sometimes people have spaces in their paths, which isn't supported by the build system. You'd think that you could just make a symbolic link: ln -s "Directory With Spaces" DirectoryWithoutSpaces And then be happy. But u...
I'm trying to build a resizable Carbon window as part of a tutorial. I am using Interface Builder 3.2.3 on Snow Leopard 10.6.4. If I create an empty Carbon project and add a window object from the Library (with Close, Minimize, Resize and Zoom buttons in the Inspector all checked), run the Carbon Simulator and then attempt to resize the...
I'll explain: Let's say I'm interested in replacing the rand() function used by a certain application. So I attach gdb to this process and make it load my custom shared library (which has a customized rand() function): call (int) dlopen("path_to_library/asdf.so") This would place the customized rand() function inside the process' m...
It looks like native applications behave differently if the user presses the Return key (right to the characters) or the Enter key (number key pad) - one time a new line character is inserted, the other time the default button is activated. How I can distinguish both key presses from Java/AWT/Swing? ...
How would one set a minimum interval for a launchd.plist script with a WatchPath key? For example, I want to run a script every time new files appear in a directory, but I would like it to only run once an hour at maximum. The launchd.plist might look something like this: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "...
Mac OS X 10.6 (Snow Leopard) has VIM pre-installed (version 7.2), which is great. It also has Ruby pre-installed (version 1.8.7) which is great too. However, I want Ruby autocompletion in VIM. Looking up the VIM version (vim --version) shows -ruby (i.e. ruby support isn't enabled). How to enable ruby for my VIM installation? ...
I'd like to write an iCal plugin to help me cope with the need to put most events I create onto two calendars. Google is uncharacteristically less than helpful in providing programming resources for this purpose. Can someone here provide pointer(s)? ...
My programs run out of memory like half of the time I run them. Under Linux I can set a hard limit to the available memory using ulimit -v mem-in-kbytes. Actually, I use ulimit -S -v mem-in-kbytes, so I get a proper memory allocation problem in the program and I can abort. But... ulimit is not working in OSX 10.6. I've tried with -s and...
hello, I am trying to modify the default behavior of teh dock when you click on an icon of a started application. By default it bring the main window of the application to forefront. What I would like to be able to do is to be able to perform a custom operation when the icon is clicked. Any idea to achieve this? Thanks and regards, A...
I think the fixed 6x13 font, FixedMedium6x13.dfont, the default in X11, is the best programming font. All the others that people gush about (Consolas, Inconsolata, Proggy, Monaco) just aren't as compact (without sacrificing readability). Or maybe I just like it. For the purposes of this question, assume we want nothing less than the X11...
It used to be that in Carbon you could use SetMenuItemKeyGlyph. What's the alternative under 10.6? Will I need to use undocumented goodness or...? Thanks ...
I am trying to merge two .nib files. FileMerge has no problem showing the comparison of the two files. I am trying to keep all the settings in one file (i.e. right side) except for two settings that I want to copy from the other file (i.e. left side). The differences are just one line of code each that changes the integer value of a a...
Hello, Is there an easy way to load, play and control an mp3 file from cocoa? Tried googling it, but, as all things apple, i get messy results and have no idea where to start. As i understand, there's and NSSound, but it has lots of limitations and then there's CoreAudio, but it's very difficult. So can someone point me in a right direc...
Suppose I already have an OS X app which syncs its data using Sync Services with MobileMe. Is there an way to make my iPhone/iPad app to sync (using MobileMe or not) the data using what I already prepared for the Sync Services? I guess Apple already has the implementation inside iOS because iPhone/iPad does sync Safari bookmarks, but i...
Hi, I want to write an application to work with adress books. My first try is with the apple adress book. My problem is that I didn't found an specification for the format. I looked a bit about it and found some things out: The adress book is a package (so you can access it like a folder in the file system) In the subfolder Images/ ...