spot7.org logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML Categories
  Home » OSX » Page 1
MAMP suddenly stopped working
Somehow my etc/hosts file had been completely wiped clean. Not sure how or why or what caused the file to be blown away. Luckily I had a copy to restore from. After the restore everything is once again functioning properly. Thanks to @emrys57 for the tip to look here: DNS Lookup failed - Error with all browsers Cheers!

Categories : Osx

Problems installing Flagmatic
Wow, this is somewhat dated information that they provide, since for well over a year csdp is an experimental Sage package. You should be able to just do sage -i csdp to install it (if you have compiler tools, which you probably do in this case). I guess the old instructions would still work but are a little brittle w.r.t. Sage. Anyway, to the actual problem. You need to do the exact comman

Categories : Osx

Applescript to Save File as Two Separate File Formats with Fixed Extensions
Updated Answer I have improved the script a little. It will now do nothing and exit gracefully if you select Cancel when entering the Job Reference number. It will also now handle spaces in the Job Reference number. It also creates an output directory on your Desktop, so if you enter a Job Reference number of 1234 you will see a directory (folder) called 1234 appear on your Desktop which contains

Categories : Osx

Using Grand Central Dispatch in Swift to parallelize and speed up “for" loops?
A "multi-threaded iteration" can be done with dispatch_apply(): let outerCount = 100 // # of concurrent block iterations let innerCount = 10000 // # of iterations within each block let the_queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0); dispatch_apply(UInt(outerCount), the_queue) { outerIdx -> Void in for innerIdx in 1 ... innerCount { // ... } } (Y

Categories : Osx

Jmeter is not starting in mac osx 10.10
This is an issue with Java on this new OS. As per answer on mailing list, reinstall java: http://support.apple.com/kb/DL1572 See also: OSX 10.10 and Eclipse Luna. Own App crashes when started from inside Eclipse

Categories : Osx

jmeter is not downloading using brew in mac osx
Try to first update brew: brew update Then retry it again, as it should download jmeter 2.12 not 2.11. Also if you want to download jmeter-plugins with it, you can use: brew install jmeter --with-plugins

Categories : Osx

OSX Terminal command to move all files in directory
*.* matches all filenames that have a dot in the second or further position. It will not match filenames that do not have a dot. Using * instead will match all filenames that do not start with a dot.

Categories : Osx

Why is Vim able to defeat my file permissions? OS X
it works because you own your home dir and have permissions to make ownership changes in it, and so vim does an effective "chown" by moving the files around and writing a new one in the background first so you can write it. It's not an actual chown as pointed out. You can also see another answer to this here IME, 99% of problems on *nix are path and permissions. here, it's permissions. You have p

Categories : Osx

install g77 using fink
The compiler g77 is quite old and part of the gcc 3.x era. Since gcc 4.0, g77 has been replaced by gfortran. While gfortran is not an F77 compiler, it should compile just about any standards compliant (and with some vendor extensions) F77 code. I would advise to avoid any tutorial asking you to install compilers like g77 or f2c as it is a clear sign they are severely out of date. If fink doe

Categories : Osx

OSX UI emacs, git commit/rebase opens empty buffer
Follow the steps on the Emacs for OS X website: Create a script in your PATH called "ec" containing #!/bin/sh which osascript > /dev/null 2>&1 && osascript -e 'tell application "Emacs" to activate' /Applications/Emacs.app/Contents/MacOS/bin/emacsclient -c "$@" Then use git config --global core.editor ec A simpler version of this is just git config --global core.editor "/Appl

Categories : Osx

How slow is too slow for Macports selfupdate?
@cfd: I had the exact same problem while doing a sudo port -d selfupdate, (-d debug mode which implies -v verbose mode) being stuck on ===> making all in src/darwintracelib1.0 for ten+ hours. In my case, I had an older version of Xcode (and in turn the command line tools). Because I hadn't originally installed Xcode from the official Apple App Store, I was not receiving notifications tha

Categories : Osx

Error when installing FLTK 1.3.3 on mac OS X 10.10
First go to the fltk-1.3.3 folder and type export CXX=c++. This will tell the compiler to use Clang++ to compile FLTK. Then type ./configure and sudo make install. That's it. After this, you might want to check if FLTK is properly installed by typing fltk-config --version and to if it gives 1.3.3.

Categories : Osx

how to make NSScollview scroll properly (Swift)
You will need to add the boxes as subViews to separate view, set its size correctly and set that view as the documentView of the scroll view. BTW, are you sure that 170-(70+5)*k is correct for the y position?

Categories : Osx

capture segfault with lldb on OS X
Try running your program separately and attaching to it. If your binary is called a.out, you would use the process attach --waitfor command like this: term1$ lldb (lldb) pr a -w a.out term2$ a.out lldb will poll the process table repeatedly until a.out starts up - when it sees the process, it will attach to it. In the lldb terminal, c (continue) the process execution. Alternatively, you m

Categories : Osx

Is it possible to create a universally accessible symbolic link (symlink) in Mac?
You could set a variable in your profile like this: repos=~/Desktop/repos Then just use $repos in your scripts and in Terminal cd $repos

Categories : Osx

How to remove suspicious Chrome extension in Mac OS
According to https://support.google.com/chrome/answer/3123708?hl=en: Simply hover over the site or domain and click the X that appears and then click Done.

Categories : Osx

Terminal's "codesign" command trouble
You're just missing a parameter here. I can re-codesign an app using --force and specifying exactly which signature I want to use: $ codesign --force -s "Developer ID Application: Michael Dautermann" Mail.app Mail.app: replacing existing signature And if you want to verify that Mail.app is indeed signed, here is what my copy of Mail looks like before I forced my signature onto it: $codesign -

Categories : Osx

MAC go get github.com/go-gl/gl
Unless you have a good reason not to, you should use go-gl/glow package instead of go-gl/gl. It will provide you and your users with a better experience. https://github.com/go-gl/glow#glow

Categories : Osx

Backup to external HDD with terminal commands
cp -R /Path-to-folder /Path-to-external-HDD This wil copy the folder from (Path-to-folder) to the external HDD If you want to make this an recurring command, the are a few steps to be made: Open texteditor and write: http://pastebin.com/fNuCMMr4 Save it as Backup.plist Now navigate to /Library/LaunchDaemons and place the file in the folder Restart your machine Every day at 15:00 the fol

Categories : Osx

Why can't I cd into this directory?
You are calling cd with two arguments, Prog and 16.1. You need to call it with just one argument, Prog 16.1. To do this, you need to "quote" the space in the middle, so that it doesn't get interpreted as separating two arguments. Here are a few options: cd 'Prog 16.1' cd Prog' '16.1 cd "Prog 16.1" cd Prog" "16.1 cd Prog 16.1

Categories : Osx

How to run a command to use data from a txt file to execute them one by one smartly
You can use arpwatch to keeps track for ethernet/ip address pairings. You run it like this: arpwatch -i eth0 And if you want to check the logs: tail -f /var/log/syslog Output: Nov 10 15:59:34 debian arpwatch: new station 192.168.1.2 0:17:9a:a:f6:44 eth0 Then you can do a bash script more easy. A few examples like... Find the last log of a MAC tail -f /var/log/syslog | egrep -i xx:x

Categories : Osx

automator take screenshots of website recursively
No need for Automator, just use webkit2png which you can install easily with homebrew like this: brew install webkit2png Then put a list of all your sites in a file called sites.txt that looks like this: http://www.google.com http://www.ibm.com and then run webkit2png like this: webkit2png - < sites.txt Or, if you don't like that approach, you can do something like this just with the b

Categories : Osx

setenv in Apple Script does not work in Mac OS 10.10 (Yosemite)
I could solve it by adding launchctl to the line: do shell script "launchctl setenv VAR value" I also had the problem using nohup in the same script and had to use the full path /usr/bin/nohupinstead.

Categories : Osx

Can I install Xcode 6 on Mavericks?
Yes, Xcode 6 is supported on Mavericks, providing you are running Mavericks 10.9.4 or later. Xcode 6 requires a Mac running OS X version 10.9.4 or later or 10.10. Source: https://developer.apple.com/library/ios/documentation/DeveloperTools/Conceptual/WhatsNewXcode/Articles/xcode_6_0.html

Categories : Osx

Meteor: unexpected mongo exit code 100 when using ssh client on OS X
OSX ssh is a version of OpenSSH, which is essentially the reference version of ssh. It's extremely unlikely that it's doing something unique or different than putty which prevents mongodb from working. It is possible that you're using ssh differently than you're using putty, and that's preventing mongodb from working. You haven't given us any information about exactly how you're running ssh, or w

Categories : Osx

How can I distribute a beta Mac App Store app using Xcode 6.1?
Even if everything seems ok, sometimes the storeagent daemon goes wrong. This may lead to: the wrong version is retrieved in the receipt the AppStore login does not show up etc. A good way to start over is to kill the storeagent: On OS X 10.6 to 10.9: Open the Activity Monitor application and kill the storeagent process (the original tip comes from the Apple Developer Forums). Retry to lau

Categories : Osx

cx_freeze does not find python 3 path mac
I met the same problem and it is fixed by installing a separated python besides anaconda. It seems to be similar with the problem here py2app is not copying the Python.framework to the new app while using virutalenv

Categories : Osx

Localization of OSX service menu entry does not work for Simplified Chinese
I submitted a Technical Support Incident (TSI) to Apple and received the answer that this is an OS X bug (I will file a bug report). A workaround is to name the respective folder not "zh-Hans.lproj" as the standard requests, but "zh_CN.lproj" instead. With this name the menu entry appears correctly in Simplified Chinese.

Categories : Osx

Cant log in to BeagleBone Black's SSH through my Mac?
I'm not sure how a Ethernet to USB adapter works but using the plain USB adapter that comes with the BeagleBone Black, after installing the above mentioned drivers, you need to restart the Mac and then try opening http://192.168.7.2 or ssh root@192.168.7.2

Categories : Osx

Why ORSSerialPort receive delegate don't work in my Swift project
The fundamental problem is that you immediately close the port and the program ends after sending data out on the port. You need to keep the program running and the port open to receive data. The simplest way to do this is to just spin the run loop after you send data: func readLine()->String?{ return NSString(data:NSFileHandle.fileHandleWithStandardInput().availableData, encoding: NSUTF8S

Categories : Osx

git: new blank line at EOF
There are two issues, here. you are confused about "newline" vs "new line": A "new line" is an actual empty line (contains only a "newline" character) and a "newline" is a special character used to mark the end of the current line. Most compilers, interpreters and Unix tools expect your text files to end with a newline to avoid ambiguity when dealing with multiple files, not a "new line". Mos

Categories : Osx

inject Overylay icons in finder mac os x
Maybe try the new Finder Sync? https://developer.apple.com/library/ios/documentation/General/Conceptual/ExtensibilityPG/Finder.html

Categories : Osx

OSX make command line app show icon in dock while running
Given that the app creates a modal dialog, I assume it's using Cocoa. In that case, you can do [[NSApplication sharedApplication] setActivationPolicy:NSApplicationActivationPolicyRegular] at the point where you display the dialog. You should be aware that the Dock may show an odd icon. Prior to Yosemite, unbundled executables got a generic icon that looks a bit like a terminal window with the wor

Categories : Osx

How to use a joystick from SDL on a Mac?
You need to take a look at the following SDL2 function call: SDL_GameControllerAddMappingsFromFile This will read in gamepad configurations for gamepads that are not supported by SDL2 out of the box. To get a community maintained list of controllers, please take a look at: gamecontrollerdb.txt To create your own mappings for obscure gamepads that you may have lying around, you need to run the

Categories : Osx

How to do something when Enter-key is pressed on NSTextField
@IBAction func textFieldAction(sender: NSTextField) { print(sender.stringValue) }

Categories : Osx

Sublime 3: Strange output using build system for Python3
I think I have an answer for you. Your path variable "path": "/usr/local/Cellar/python3/3.4.2_1/bin", needs to append to the existing $PATH. Simply replacing that line in your build file with "path": "$PATH:/usr/local/Cellar/python3/3.4.2_1/bin", fixed it for me.

Categories : Osx

Replace text in PDF using Cocoa
It is not possible to replace text in PDF using CGPDF* API. PDF -> HTML -> PDF will not work because the double conversion will loose content (PDF and HTML formats are not quite compatible). The only solution is to find a 3rd party toolkit that supports this functionality.

Categories : Osx

Apache Virtual Document Root "/sites/%-2.0.%-1/www"
It seems like this is a roundabout way of saying take the last two segments of the hostname. The interpreted part is %-2.0.%-1 %: begins the interpolation, that's easy. -: means go right-to-left counting which segment of the Hostname the next digit refers to 2: 2nd component of the Hostname The ".0" is kind of a hack to allow you to include a literal "." immediately after a %X .: literal "." %

Categories : Osx

Using Alphabetical Characters as Actions. Mac OSX NSEvent? SKAction?
I believe I found the solution! Credit to User: Gilian Joosen func returnChar(theEvent: NSEvent!) -> Character?{ let s: String = theEvent.characters! for char in s { return char} return nil } override func keyUp(theEvent: NSEvent) { let s: String = String(self.returnChar(theEvent)!) switch(s){ case "w": explosion() break case "s": D

Categories : Osx


Recently Add
Shell script loop over array passed as argument to multi-argument function?
MAMP suddenly stopped working
Problems installing Flagmatic
Applescript to Save File as Two Separate File Formats with Fixed Extensions
Using Grand Central Dispatch in Swift to parallelize and speed up “for" loops?
Jmeter is not starting in mac osx 10.10
jmeter is not downloading using brew in mac osx
OSX Terminal command to move all files in directory
Why is Vim able to defeat my file permissions? OS X
install g77 using fink
OSX UI emacs, git commit/rebase opens empty buffer
How slow is too slow for Macports selfupdate?
Error when installing FLTK 1.3.3 on mac OS X 10.10
how to make NSScollview scroll properly (Swift)
capture segfault with lldb on OS X
Is it possible to create a universally accessible symbolic link (symlink) in Mac?
How to remove suspicious Chrome extension in Mac OS
Terminal's "codesign" command trouble
MAC go get github.com/go-gl/gl
Backup to external HDD with terminal commands
Why can't I cd into this directory?
How to run a command to use data from a txt file to execute them one by one smartly
automator take screenshots of website recursively
setenv in Apple Script does not work in Mac OS 10.10 (Yosemite)
Can I install Xcode 6 on Mavericks?
Meteor: unexpected mongo exit code 100 when using ssh client on OS X
How can I distribute a beta Mac App Store app using Xcode 6.1?
cx_freeze does not find python 3 path mac
Localization of OSX service menu entry does not work for Simplified Chinese
Cant log in to BeagleBone Black's SSH through my Mac?
© Copyright 2017 spot7.org Publishing Limited. All rights reserved.