Macos What are some useful TextMate shortcuts?

Macs are renowned (or bemoaned) for having an extensive number of shortcuts. However, OS X itself pales in comparison to the shortcut lists in TextMate and its bundles. What are some useful keyboard shortcuts you use?

Macos Save entire desktop state?

I'd love to have a utility that would save and restore my current desktop state, much like sessions in Firefox. At best, it would freeze every application's state, open window positions, etc. and provide a scriptable interface to restore them at any time, just as you'd left them. More realistically, I could make a list of what applications were open, hide/minimize them, hide them from the dock, etc., so that restoring them (if they were still open) would appear to resume them - and so that it

Macos Mac Resource editor in Snow Leopard?

I have some OLD programs that I'm mantaining. They still use resource files with resource forks, and all that hideousness. My co-worker uses a 10.3 box that can still run mac classic programs and RezEdit. I used to use ReSorcerer, but it doesn't seem to work very will in 10.6. Does anyone have any recommendations for programs to use? ETA: I need to be able to edit DITLs in a wysiwyg manner. So, it has to have some tools for moving around buttons, etc. Rezilla seems to only give me a list

Macos Filemaker Pro 9 (Mac) : How do I get it to deal with absolute paths?

I have an installation where FM Pro 9 clients open a solution from an FM Server 9. This solution then needs to access files on a network share from the clients. So far, the network share was mounted with AFP, but an infrastructure change required it to be switched to static NFS mounts. Their boot Volumes may have different names, but they all mount an NFS share at the same mount point in the "real" mount tree (starting from the UNIX root dir, /). According to http://www.filemaker.com/help/htm

Macos Mac OSX. Storing data on app package, good idea?

I am designing a small app for Mac OSX with little requirements and thinking on the simplest (in terms of laving the system clean) place to store status of the program. A candidate location could be in a specific folder in the app package, this way you don't create any other folders, user can uninstall simply erasing the package etc. Do you think that this is a god I dea or will find problems (privileges probably)?

OpenGL slowdown when fullscreen on MacOS X using SDL?

I've been using the latest SDL 1.3 with OpenGL to develop a game that is now in beta testing. Some users are reporting massive slowdowns when fullscreen -- about 18fps -- on something that can easily run 200-300fps in windowed mode. These same users are usually able to "fix" the problem by toggling between windowed and fullscreen modes once or twice. It then runs full-speed for them even fullscreen. I'm unable to duplicate it on any of the systems I test on. And the three users who are experien

Macos How to tell if NSWorkspaceWillPowerOffNotification is caused by a restart or a shutdown?

I'm developing a Cocoa app and I need to perform different actions before the app get closed. I need to know when the app is closed due to a restart and when due to a shutdown. Through NSWorkspaceWillPowerOffNotification the app recieves a notification regardless of the fact that it's a restart or a shutdown. Is there a way to identify the cause of poweroff?

Macos Mac OS X app sandbox issue

I am writing a command line tool. There I'd like to create a directory in the /Users/user_name/Library directory. When I run that program from Terminal as a root, then everything is ok, but the problem is when I want to use that tool as a backend for cups (that program is called, also as root, when I print something). The program is called, but in the system.log file I found the error: sandboxd: deny file-write-*. I'm a new Mac OS X programmer and I'm not sure how to fix it. Anybody can help me?

Macos set responder chain between two nsbuttons in IB

I have two nsbutton in my window.I need to link between these two in a way that,if the user press tab focus should go to the next button. I know how the responder chain works.My Question is How to do this in interface builder.Please help.

Macos Symbolically link all JPGs in a directory tree to a single directory

I have a series of directories, and images contained within: /Volumes/library/Originals/2012/2012-05-13 Event/filename.jpg /Volumes/library/Originals/2011/2011-03-11 Event/filename.jpg /Volumes/library/Originals/2011/2011-01-12 Event/filename.jpg /Volumes/library/Originals/2009/2019-07-11 Event/filename.jpg Using bash, how can I create symbolic links to this directory tree in a single directory? /image-links/filename.jpg /image-links/filename1.jpg I need this to get my photos screen saver

Macos KVO: not receiving notifications on NSTableView's -selectedRowIndexes?

I'm trying to have a custom subclass of NSTableView observe the value of its own -selectedRowIndexes property, and I'm having trouble figuring out how to receive the notifications properly. My subclass looks like this (using ARC): @implementation MyTableView - (id)initWithCoder:(NSCoder *)aDecoder { if ((self = [super initWithCoder:aDecoder])) { [self addObserver:self forKeyPath:@"selectedRowIndexes" options:NSKeyValueObservingOptionOld | NSKeyValueObservingOptionNew context:NULL];

Macos Recover Couchbase password without knowing it

I'm working on a mac, downloaded the community edition for mac. Launched the app, and opened the admin console. So far so good, untill I logged out. Now I can't log in again since I've never had to set the password in the first place. It might have been set on a previous version a whole while back, but I'm not sure. Reinstalling it doesn't work. I keep getting bounced back to the login screen. Executing the following command as suggested in other posts and help online results in a crash of erl

Macos Creating a mssql database backup using odbc on mac

So, MSSQL is nice enough to have given us a nifty little sql code for creating a database backup from a command line: BACKUP DATABASE [db_name] TO DISK = N'D:\backups\back.bak' WITH NOFORMAT, NOINIT, NAME = N'db_name', SKIP, NOREWIND, NOUNLOAD, STATS = 10 GO However, I am looking to be able to run this command from a php or even shell script on a remote Mac server. The Problem I am running into is when I try to change the DISK to say my admin home directory, it keeps complaining to me abo

Macos Increment Progress Bar in AppleScript

I have an app that is using the "SKProgressbar". I'm looking to have this progress bar increment say by 10 based on the process of the second shell script that is running in it. I am not sure if this is possible. I have provided the script below. I am new to this. on open adisk set terminalcommand to "cd " & quoted form of (POSIX path of adisk) & " ; find . -name '.DS_Store' -type f -delete" do shell script terminalcommand set xxx to "cd " & quoted form of (POSIX

Macos Desperately trying to build open source tools (octave) on a Mac 10.6 Snow Leopard (involves Xcode, gcc, fink)

The ironic thing is that all this used to work on my Mac, but Apple no longer supports 10.5.8, so I was forced to update to Snow Leopard, 10.6. And everything broke (thank you Apple). On the surface, it seems simple. Build an open source package like octave under Snow Leopard (Mac OS X 10.6) Apple has made this difficult, to say the least. They no longer download XCode for older operating systems unless you are a paid developer. My Macbook pro 2.16Ghz cannot load Lion, so that option is no

Macos Making sure /usr/local/bin is in my $PATH on mac

I've installed node.js for Macintosh using the lastest installer for Macintosh. I now want to check that /usr/local/bin is in my $PATH, as the installer instructed. I've opened up the Terminal application and researched help on the net, but I'm lost, as to how to accomplish the above, then start the node.js process. Can anyone clear this up? Thank you for very much.

Macos Groovy and Sublime Text 2

I am on a Mac OS X system and use Sublime Text 2 for Groovy development. When I build my file I get /Users/it.dev/groovy-2.1.8/bin/groovy: line 31: dirname: command not found /Users/it.dev/groovy-2.1.8/bin/groovy: line 33: /startGroovy: No such file or directory [Finished in 0.0s with exit code 1] I have placed the path to groovy on my /etc/launched.conf file as follows setenv GROOVY_HOME /Users/it.dev/groovy-2.1.8 setenv PATH $PATH:$GROOVY_HOME/bin from the command line groovy works fine

Macos How can I trigger keyboard commands via AppleScript in a Flash-generated upload prompt?

I'm trying to submit upload a photo to a website via AppleScript. The basic experience is: Load Site [done] Click "Upload" [done - triggers Choose File prompt in what looks like the Finder, but still says Safari in top left] Type file path in prompt and submit using: tell application "System Events" keystroke "g" using {shift down, command down} keystroke "/Users/myUser/Pictures/myPic.jpg" key code 36 end tell But instead the AppleScript just stops moving once the prompt appear

Macos How to access elasticsearch from Linux Guest (Virtualbox) to OSX Host?

As the question states, if I have a linux/centos VM in virtualbox, how do I go to: 10.0.0.1:9200 to access elasticsearch? On the guest, I am getting a "Connection timed out error". From my OSX host, I can see elasticsearch is running with "localhost:9200". I can tell Apache is accessible from the Linux guest because 10.0.0.1 shows the apache webpage fine. In my OSX configuration, I have "Web Sharing" enabled, which is why I assume that the guest is able to access port 80, but what about elasti

Macos OS X launchd.plist

Here's my plist file <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC -//Apple Computer//DTD PLIST 1.0//EN http://www.apple.com/DTDs/PropertyList-1.0.dtd > <plist version="1.0"> <dict> <key>Label</key> <string>com.homebrew.autoupdate</string> <key>ProgramArguments</key> <array> <string>/usr/local/bin/brew_up</string> </array> <key>StartInterval</key> <integer>8640

Macos Retrieve number of messages in smart mailbox in Mail.app

I'd like to retrieve the number of messages in a given smart mailbox in Mail.app. Basically, I'd like to modify the Übersicht Unread mail count widget (available here) to show the number of messages (both read and unread) in a smart mailbox I created. The current code used in the widget is: osascript -e 'tell application "Mail" to set unreadCount to unread count of inbox The biggest problem seems to be referencing the smart mailbox.

Macos Why in Windows I can run Kivy app.run() from within Twisted reactor.callInThread(), but not in OSX?

It seems like if we develop a multithreaded application, we can't take it for granted that it'll run the same in other OSes. I am developing a Kivy application, but this Kivy application is actually started from within a twisted reactor.callInThread(). This is the snippet of the code: from twisted.internet import reactor def start_kivy(): app = SomeKivyApp() app.run() if __name__ == '__main__': reactor.callInThread(start_kivy) #it will open Kivy main application window in Wind

Macos Mass unzipping of files containing signs to be escaped and renaming of created folders using regexp

I need to create a simple bash one line sript that will do as follow: Find all zip files in folder Unzip each file Rename result folders. The first part is quite easy: find . -type f -name '*.zip' The problem comes next, as the files looks this way: ab_firstname_somestring_A!1.zip ab_secondname_somestring_A!1.zip ab_thirddname_somestring_A1.zip etc. The problem comes when using xargs - when it doesn't receive escaped filenames it will not extract them. The last problematic step is ren

Macos @font-face Gotham not working on Chrome (Mac)

I have included a font (via @font-face) called Gotham and it's working on PC (all browsers) and Mac (all browsers) except Chrome on Mac. I have the following font files: Gotham-Regular.eot Gotham-Regular.woff Gotham-Regular.otf Gotham-Regular.svg Gotham-Regular.ttf And on the css, this declaration: @font-face { font-family: "Gotham"; src: url('fonts/Gotham-Regular.eot'); src: url('fonts/Gotham-Regular.eot?#iefix') format('embedded-opentype'), url('fonts/Gotham-Regular.svg#Go

Macos Browse LDAP servers in the domain

I am following this guide. I used the following code to display LDAP servers in the domain: #include <dns_sd.h> #include <stdio.h> #include <pthread.h> void ResolveCallBack(DNSServiceRef sdRef, DNSServiceFlags flags, uint32_t interfaceIndex, DNSServiceErrorType errorCode, const char *fullname, const char *hosttarget,

Macos AutoLayout: different OS X versions, different behaviors?

I'm developing an app for OS X which shows a small window (uses Auto Layout) when exiting. The window's size is about 550 x 290 pixels and it's fixed. But I'm facing a behavior that seems pretty strange to me: Starting the app on OS X 10.7: the size of the small window is about as triple as large as it should be (width and height) Starting the app on OS X 10.8: the width of the window fits but its height is still about as twice as it should be Starting the app on OS X 10.9: the window has the

Macos QtCreator and doxygen

I need QtCreator with the doxygen plugin, possibly a recent version. It seems to be necessary to build QtCreator from source to do it, but the information I could find are quite outdated (e.g. http://wiki.qt.io/Doxygen_Plugin_for_QtCreator is about QtCreator 2.7.0, while today the latest version is 3.5.0 beta 1). Is the latest plugin version compatible with the latest QtCreator? Are those instructions still valid? Are there any prebuilt QtCreator binaries with the Doxygen plugin already incl

Macos Sub Classing NSButton

I am new to COCOA. I have created a cocoa application to display a button in a view. Created an interface derived from NSButton. I have created a window with nib file. Added a view. Created object of button interface and added to the view. CustomButton.h #import <Cocoa/Cocoa.h> @interface CustomButton : NSButton { } @end CustomButton .mm #import "CustomButton.h" @implementation CustomButton - (void)drawRect:(NSRect)dirtyRect { [super drawRect:dirtyRect]; // Drawin

Macos Enable Docker remote API in Mac (Using Docker Quickstart Terminal)

NOTE : I am not using boot2docker I am trying to enable the docker remote API on my mac. However all the question here are based on using boot2docker. While installing docker on my machine, I followed these steps using the Docker Toolbox and since then I have always used the command bash --login '/Applications/Docker/Docker Quickstart Terminal.app/Contents/Resources/Scripts/start.sh' to start docker in my local machine. I was trying to follow the steps mentioned here, which state that I have t

Macos Possible to pipe stdout directly to web browser?

I have some python utilities that generate HTML output. Instead of saving to a temporary file, and opening that in a web browser, I would like to be able to just redirect the output to the browser to preview it. For example, something like: myscript.py | open /Applications/Safari.app Is there any way to do such a thing? I am on OS X.

Macos osx complains that app is from unidentified developer, although it passes all validations

I have developer certificate (bought it from apple 99$ per year) , signed my application with xcode here also output from spctl spctl --assess -v /Volumes/<valume>/myapp.app /Volumes/<valume>/myapp.app: accepted source=Developer ID I have check also my application via RB app checker light all seems ok , app checker can see that app is signed. but when I creatin dmg which contains my app, uploading it to our server, the downloaded app cant be opened, because osx complains tha

Macos Code for searching a word into some text files stops right before first .rtf file

I'm trying to make a program which finds a word into some .rtf files e.g : I have some text edit files with all the words which starts with all the characters(WordsWhichStartsWithA.rtf, WordsWhichStartsWithB.rtf, WordsWhichStartsWithC.rtf etc), and when I give a word(e.g : "help") I want to return the file where the given word is (in this example "help" will be in WordsWhichStartsWithH.rtf file, and the program will return WordsWhichStartsWithH.rtf NOT WordsWhichStartsWithW.rtf where "whelp" i

Macos Kubectl: fatal error: runtime: bsdthread_register error

I haven't used kubectl in about two months. It was working well in June but now I get the following error: $ kubectl fatal error: runtime: bsdthread_register error runtime stack: runtime.throw(0x2cb65a5, 0x21) /usr/local/go/src/runtime/panic.go:596 +0x95 fp=0x7fff5fbff810 sp=0x7fff5fbff7f0 runtime.goenvs() /usr/local/go/src/runtime/os_darwin.go:108 +0xa0 fp=0x7fff5fbff840 sp=0x7fff5fbff810 runtime.schedinit() /usr/local/go/src/runtime/proc.go:486 +0xa1 fp=0x7fff5fbff880 sp=0x7fff5

macos-sierra xquartz installation successful but app will not run

I have installed the latest version of Xquartz from www.xquartz.org and the installer says it was successful. However, it will not run and I have to force quit it. I also tried a much older version of x11 via MacPorts and it worked, but is not compatible with X2go client, which is how I'd prefer to use it. Apple support will not assist. I didn't find an answer yet, here or on xquartz site. Xquartz and MacOS Sierra has a similar question but no answer.

Macos FFMPEG & MistServer: RTMP Input/Output error

I have an IP camera that outputs a RTSP stream that I'm trying to use to display a live feed on my website. This is a small site that only my wife and I will access so I'm trying to use a free streaming service. For that reason, I've decided to try MistServer's open source option. I currently have downloaded MistServer and have it running without installation on my mac (sudo ./MistController). With MistServer running, I have a stream set up and default protocols configured. The stream is confi

Macos postgres user doesn't work after Migration Assistant to new mac

I got a new mac today and ran the migration assistant which worked great for most things, however I can't seem to get into psql now. postgres is installed with homebrew and the service starts fine, however whenever I run 'psql postgres' now I get the following error: psql: FATAL: role "Jamie" does not exist Jamie being my actual account name for the user on my mac. This was all working/running absolutely fine on my old mac...

Macos Use awk output as variable for string comparison

I'm filtering the output of ifconfig on a macOS (High Sierra) to trigger an action using a simple if statement, though the action isn't triggered although the corresponding strings appear to match (when tested with echo). When the script is run, if the network en1 is active, the expected action is to print OK. I tried: printf "%s" in the awk command using a double (and simple) quote for "active" holding active in a variable for the comparison replacing en1_status=`...` by en1_status=$(...)

Macos Locating Selenium Safardriver Logs in OSX

Has anyone ever used the Webdriver logs from Safaridriver in OSX? I ask, as using the below Safaridriver configuration, I don't see the logs in the specified directory, or /User/${USER}, /tmp, or /var/log. SafariDriverService svc = new SafariDriverService.Builder() .withLogFile(new File("/tmp/safaridriver.log")) .usingAnyFreePort() .build(); new SafariDriver(svc, options); Does anyone know where (Apple's bundled) Safaridriver writes logs? I also tried, using RemoteWebDriver Safa

Macos Can NSCollectionViewCompositionalLayout support "growing cells"

I have a collection view showing a simple one-column list with a NSCollectionViewCompositionalLayout. The cells take the full width and have a fixed height. I would like that, upon an external event, one of the cell grows in height (animated). That could be for example : when the cell is selected when an image shown in the cell is downloaded I found no way to do this in Apple's doc, when I think this is a fairly common use case. It seems that NSCollectionViewCompositionalLayout is very fle

Finding click location in SwiftUI on MacOS

I've tried to adapt a solution I've used on an iOS app to macOS using NSViewRepresentable instead of UIViewRepresentable. Below is my 'Tappable View'. My problem is that when I try to use this view I get the error Cannot find "TappableView" in scope. Thanks. (using Xcode Version 12.0 beta 4) import Foundation import SwiftUI struct TappableView: NSViewRepresentable { var tappedCallback: ((CGPoint, Int) -> Void) func makeNSView(context: NSViewRepresentableContex

Macos Brew Install Octave - Permission Denied

I am having a hard time running brew install octave on my machine. Here is the specific error I am getting since it fails on the package icu4c: ... ==> Installing octave dependency: icu4c ==> Pouring icu4c-67.1.catalina.bottle.tar.gz cp: /usr/local/Cellar/icu4c/./67.1: Permission denied cp: /var/folders/k4/xg60pppx3392pm_9tjyy35gc0000gn/T/d20200815-50984-1k6mia6/icu4c/./67.1: unable to copy extended attributes to /usr/local/Cellar/icu4c/./67.1: Permission denied cp: /usr/local/Cellar/icu4c

Macos Running executables from unidentified developer in terminal

I am trying to run a windows executable using wine on macOS. My command is: wine64 setup.exe But I keep getting an error about the executable being from an unidentified developer, which makes it impossible to run it. Wine only works in terminal, and I don't know how to supress this security measure there. How do I disable the "unidentified developer"-check from the terminal on macOS?

  1    2   3   4   5   6  ... 下一页 最后一页 共 156 页