Use case : install a specific version of capistrano to deploy stuff somewhere Let’s say you need to install capistrano 2.* to be able to use your deploy scripts. In this case, I’m running a fresh Yosemite install. Let’s say we’ll need to setup a specific ruby version with a specific gem version. To do …
Mac
How to configure HTTPS/SSL under Apache and OSX
My setup : OSX : 10.8.5 Apache : # httpd -V Server version: Apache/2.2.26 (Unix) Server built: Dec 10 2013 22:06:35 Server’s Module Magic Number: 20051115:33 Server loaded: APR 1.4.5, APR-Util 1.3.12 Compiled using: APR 1.4.5, APR-Util 1.3.12 Architecture: 64-bit Server MPM: Prefork threaded: no forked: yes (variable process count) Server compiled with…. -D APACHE_MPM_DIR=”server/mpm/prefork” …
Add a C header include path to compile PECL extensions
I needed to use ImageMagick with PHP on Mac OS X. Using homebrew I added ImageMagick to my system as follow : $ brew install imagemagick And then, add the PHP extension with PECL : sudo pecl install imagick Bad luck… cc -I. -I/private/tmp/pear/temp/imagick -DPHP_ATOM_INC -I/private/tmp/pear/temp/pear-build-rootSqBVOk/imagick-3.0.1/include -I/private/tmp/pear/temp/pear-build-rootSqBVOk/imagick-3.0.1/main -I/private/tmp/pear/temp/imagick -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g …
Brew: Installing Sphinx search with mysql support on Mac OS X
I consider that you already have Homebrew on your system. Install Mysql brew install mysql start mysql server mysql.server start stop mysql server mysql.server stop Install Sphinx search with mysql support By default, sphinx was configured without mysql support, to fix it, use the following command line : brew install sphinx –mysql start sphinx searchd -c …
Mac OS X : rename terminal tabs
If you want to manually rename your tabs without using a bash built-in, just hit Shift+Command+i :
EXIF and the command line on Mac OS X
I use imagesnap for a project to capture pictures from my laptop iSight camera. The problem is that imagesnap doesn’t write EXIF data to the captured files. Phil Harvey wrote command-line application called ExifTool to manipulate files’s meta information. Pictures from imagesnap are written with the following filename format: 2012-06-06_12-12-00.jpg I wrote a small shell script to extract time information …
Right click, open with Sublime Text 2
If you like to use Finder to browse your projects, you might like adding a right-click action to open a file or a folder directly in Sublime Text 2 (or whatever you prefer). It is easily doable by creating a new service with Automator. Open Automator and create a new service: Select objects that receive …
Install DataMapper MySQL adapter on Mac OS X (10.6.6)
I’ve just installed MySQL 5 from mysql-5.5.9-osx10.6-x86_64.dmg package, see MySQL download website or mirrors. This package installs MySQL in /usr/local/mysql (symlink to mysql-5.5.9-osx10.6-x86_64). When I wanted to install DataMapper MySQL driver, I ran into the following error: $ sudo gem install dm-mysql-adapter –no-rdoc –no-ri Fetching: data_objects-0.10.3.gem (100%) Fetching: do_mysql-0.10.3.gem (100%) Building native extensions. This could take …
sudo: port: command not found
On MacOSX, if you have installed macports with the package installer, you may encounter the sudo: port: command not found problem. Macports binaries are installed in /opt/local/bin, so you just need to add this path to your PATH environment variable. Example with your user, add to your $HOME/.profile : export PATH=$PATH:/opt/local/bin You can source your …