I am programming Swift in earnest now. I am way more familiar with Objective C for building apps for Mac OS/X and iOS, but I have a few apps to write and Apple are pushing us to make the transition to Swift, so it’s time to bite the bullet and use it as my primary language for a while.
It’s quite nice working in a new language again. I am enjoying learning the design choices the Swift team has made in their language. There is some weird stuff, but on the whole it feels natural and sophisticated. It’s great that they’ve open sourced it as well, so that I can potentially use it on my Linux servers. I’m not sure that it will replace Go or Python for doing any kind of Dev Ops, but it’s great to have it as another option.
In order to build PostgreSQL from source on my MacBook Pro running El Capitan, I first downloaded the git repo:
git clone git://git.postgresql.org/git/postgresql.git
I then built it:
sudo make install
This will install the binaries to the default location of “/usr/local/pgsql”.
I already had a user called “_postgres” in my /etc/passwd file, so I configured to run PostgreSQL as this user:
Continue reading “Installing PostgreSQL from source on my Mac”
I’ve just spent about 20 minutes trying to authenticate with Twitter using the Python OAuth2 module. I kept on getting an X509 error, specifically:
ssl.SSLError: [Errno 185090050] _ssl.c:343: error:0B084002:x509 certificate routines:X509_load_cert_crl_file:system lib
The solution to this is that the cacerts.txt file in the Python installation is only readable to the root user / wheel group. In order to fix that up, first find the cacerts.txt file:
find /Library/Python/ -name cacerts.txt
Then modify the permissions on the file:
sudo chmod 644 /Library/Python//2.7/site-packages/httplib2-0.7.7-py2.7.egg/httplib2/cacerts.txt
Note that the URL endpoints for twitter on the python-oauth2 Github page are currently wrong. To use the “Twitter Three-legged OAuth Example” change http://twitter.com/oauth/request_token to https://api.twitter.com/oauth/request_token, etc.
I have created the following bit of Emacs Lisp that generates my daily productivity graph and displays it in it’s very own emacs buffer. You can kill the buffer by pressing the ‘q’ key.
Continue reading “Displaying a Productivity Chart in Emacs”
I coded up a script to output a chart of what my productivity looks like for the day. It is based on my Pomodoro software that logs all the time-boxes to my calendar on Mac OS/X. My program extracts all the information and constructs a nice looking chart. The idea is that I track what things are making me more productive.
You can find the script over in my GitHub repository
I wrote a small command-line program this morning called callistevents (from Calendar List Events). It is a Mac OS/X program that lists all the events in a specific calendar between 2 dates.
Continue reading “callistevents now on GitHub”
//To Track Thy Youtube Upon Google Analytics
//Regardless the number of Players upon thy stage
//Revised and Revisioned to Version 2.1
//Within the March of Two Thousand and Thirteen
Continue reading "Awesome Code Commenting"
It turns out that renaming XCode projects is easy! This StackOverflow thread showed me the trick. All you need to do is double-click slowly on the Project Name in the project hierarchy tree. This allows you to change the name. You then get a dialog showing the refactoring of everything related to the new project name.
Apache is still bundled with Mountain Lion, but you can no longer start it using the “Sharing” icon under the “System Preferences” app.
Continue reading “Starting apache on OS/X Mountain Lion”
I’ve just spent some time solving an issue in my iOS app. I have a custom UITableViewCell with some UILabels. When I delete a row on the UITable, the standard confirm delete animation happens. With the standard UITableViewCells, this triggers an animation where the cell labels move to the right, to make room for the delete icon on the left. With my custom UITableView, the UILabels weren’t moving to the right and were being squashed by the delete control.
Continue reading “Custom UITableViewCell Delete Woes”