HOW CURL_EXEC AND URLENCODE KILLED MY SINGLE SIGN ON

If you do any work with single sign on, you’ll be familiar with the concept of exchanging tokens and validating against the authentication server using that token. One of the issues I’ve just run into which resulted in a huge headache is with urlencoding the result of a curl_exec that had a line ending. It’ easy to miss when it’s a longer string and you aren’t paying very close attention. This is a very simple example, and it still takes a second to realize there’s an extra character at the end.

AWESOME AWK TUTORIAL

This is exactly what I look for when I’m trying to find a tutorial. Thank you, Andrew M. Ross. My favorite awk tutorial ever.

DECIMAL VS FLOAT IN MYSQL

While I’ve known how floating points are stored, I didn’t know if decimal was stored any differently, or if it was more or less accurate. According to a post on the MySQL list: Bruno Rodrigues Silva wrote: Dear all. The MySQL Manual inform that Decimal Data Type is used for represent exact-number, but like Float Point Data Type, Decimal use rounding case the fractional part is not sufficient. Therefore, what the difference?

PROBLEMS INSTALLING SUBVERSION FROM SOURCE ON CENTOS

I was setting up a new server for someone, and encountered this error while I was trying to build svn /usr/bin/ld: cannot find -lexpat Now, while I can do some things on that a sys admin can, I am by no means a sys admin. I have only installed svn a handful of times, and I didn’t know what this was. First I installed expat from source. It didn’t help.

REPORT SPACE REMAINING ON DISK ON UNIX LOGIN

I get a kick out of stuff like this. Add this to your .bash_profile to be greeted with the remaining space on your disk. df -h | awk ‘NR==2 {print “Space available " $4}’ This will actually change depending on which version of df you’re using (i think). I get different output on my Mac than I do on a CentOS machine - df seems to auto wrap lines on long drive names, so when I check the space on the CentOS server I need to change the line number (NR goes to 3) and the column to print (down to 3).

BBEDIT, I LOVE YOU, BUT PLEASE CAN WE HAVE A FEW MORE THINGS?

BBEdit is made by Bare Bones Software. For text editing, I’ve never used anything better. I swear by it. It’s got absolutely amazing search / replace, regex support, shell worksheets, and the fact that I can write a plugin in pretty much any language ever made is unbelievable. That being said, it’s still missing a few things that I’d love to see. I know I sound greedy, but I did pay about 180 for a text editor.

HOW TO INSTALL THE LUCENE SEARCH ENGINE USING SOLR

I’m going to go through the steps necessary to install and start using Solr. I’ve always been interested in trying out Lucene, but I never felt like dealing with writing my own wrapper around the classes. Solr simplifies this by creating a fully working search engine as a web service. Let’s get started. You’ll need to check to see if Java is up to date. Run the below to find out.

WESTERN DIGITAL DRIVE WITH LEOPARD - FILE SYSTEM FORMATTER FAILED.

I just bought a 1TB Western Digital drive. I am stoked. However, I tried to format the drive on my Mac (Leopard) and got the error “File system formatter failed” when I tried to format the disk as MacOS Extended (Journaled). Not cool. I found this forum thread which suggested using multiple partitions to solve the problem. When I was trying this, I went into options and changed the partition scheme from Master Boot Record to GUID partition table.

EXECUTING MULTIPLE CURL REQUESTS IN PARALLEL WITH PHP AND CURL_MULTI_EXEC

Let’s get one thing out in the open. Curl is sweet. It does it’s job very well, and I’m absoutely thrilled it exists. If you’re using curl in your PHP app to make web requests, you’ve probably realized that by doing them one after the other, the total time of your request is the sum of all the requests put together. That’s lame. Unfortunately using the curl_multi_exec is poorly documented in the PHP manual.

EXTERNAL LIBRARIES IN XCODE

c++ mysql xcode I need to compile something and use the MySQL C++ library. I have mysql and mysql++ already compiled, I won’t go over how to do that now. I added the following code to the top of my source: #include <mysql++.h> I got an error /Users/jhaddad/dev/search_engine/main.cpp:4:21: error: mysql++.h: No such file or directory Not cool. How to fix: In XCode, open up the project settings (under the project menu).