Skip to main content

Posts

Showing posts from February, 2014

Using Boost on OS X with Jetbrains' AppCode

So, after a serious pain in the butt getting Boost installed using the homebrew boost keg (see my previous post ), I decided to test things out using AppCode. Obviously, since this is a "3rd party library", a little massaging has to be done to get the libraries and headers found, and it's sufficiently obscure to deserve a post. I will list the procedure using my rig (OS X). You can extrapolate from this to your own kit. Right-click on your project icon, and select, "Project Settings..." , and scroll down to the "Search Paths" heading. About the third or so option down is "Header Search Paths" . Open that, and select either or both your type of build (Debug/Release), and then double click to the right of it under the "value" column. This will open up a window where you can add a path. Click the "+" and enter the path to the location of your copy of Boost's Headers. In my case: /usr/local/Cellar/boost/1.

Boost on OS X using the brew boost keg

I was installing boost today using the *brew keg*, which shows it's for the latest version, 1.55.0, but I kept running into errors. --HEAD --with-mpi In the case of #1, it kept puking every time it tried to grab boost from svn. In the case of #2, no matter what I did, including this option kept giving a warning about Python support soon to be deprecated. And yes, I tried the --without-python` option. It just wasn't happening. I don't know if it's a problem with the keg, or a problem with this particular build of Boost. Finally, I was successfully able to get things to build using: brew install boost --c++11 --with-icu --without-python --without-single

OS X Process-Fu 101

OS X is of course a variety of BSD Unix, not Linux. Often is the case where Linux commands either don't work, or don't give the same results on OS X as they do on Linux. For example, a basic netstat will give you a long list of the processes making network connections on your box. On Linux, various command line options can help you drill down from there, to get the answers to more specific queries. On OS X, those same queries don't give you the answers you're seeking. This isn't a compare and contrast article between Linux and OSX. Instead, I'm just noting various commands that can give answers to some basic questions. On OS X, for example, to get an answer to the question: "What process is running on port 50224?" we would use: sudo lsof -Pn | grep 50224 This will give you a list of everything connected to port 50224, sans any kind of headings. A much more abbreviated command that will give you essentially the same things, but with column

Development Server Alternatives

Besides running a local copy of Apache on Nginx or your dev box, or using *vagrant*, the only other alternatives for a long time were XAMPP, MAMP, etc. While there are certainly good arguments for using them, for folks like Web Designers and such, there are a lot of technical hoops to jump through that just aren't needed for these types of use cases. And, there are times as well where we coders might want to throw up some flavor of CGI scripted code, and not have to mess with any of the above. Along come two excellent solutions, one completely Open Source, the other Open Source enough for the above use case. In fact, the completely open source solution is a fork of the other, prior to its changing its license to GPL. What I'm talking about is: Mongoose Civetweb Basic Rundown The Mongoose Docs will cover all the nuances, but basically, you can download the .dmg, open it, drag the app where ever you want to run it from, and double-click it. When the app op

Multiple Domains on a Single Host

So the problem is simple. We're developing one, or a number of sites on our development box. We would like to be able to hit them in our browser via their url names, rather than various permutations of ip number and folder structure. I do my development on a Mac, so this solution is for OS X. The first step is to go into: /etc/hosts in a text editor, and assign the url to the loop-back address (you can just put it under all the other entries): 127.0.0.1 my-ghost-blog.com No that this is done, we next need to flush our dns cache using the following command in the terminal: dscacheutil -flushcache OK, now we can go to: my-ghost-blog.com in our web browser, and it will bring up our local running instance of ghost. --- This is a well known problem, and has a well known solution. The more of these solutions there are across the web, the greater the chance they will be found by any number of different key words.