Installing MatPlotLib on OS X for Python Version 2.6.1 with PIP and VirtualEnv
If you thought you had installed matplotlib only to find this
File "/Library/Python/2.6/site-packages/matplotlib-0.91.1-py2.6-macosx-10.6-universal.egg/matplotlib/numerix/__init__.py", line 166, in
__import__('ma', g, l)
File "/Library/Python/2.6/...
Written by Sean Behan on 06/17/2012
Have Git Email Committers After Pushes
You need a Mail Transfer Agent MTA on the server. The easiest way is to install Sendmail, which Git uses by default.
apt-get install sendmail
Remember that /etc/hosts file needs the ip address to map to the domain name your sending mail from
# vim /et...
Written by Sean Behan on 06/17/2012
Change the Default Controller Name in Rails Functional Tests
Rails will infer the controller you want to test from the class name of the test case. For example...
class PeopleControllerTest < ActionController::TestCase
end
will test the app/controllers/people_controller.rb.
To change this is trivial. Us...
Written by Sean Behan on 10/23/2013
Apache Rewrite Rule for Mapping to index.php in Sub Folders
Below is an example URL structure with rewrite rules using an Apache .htaccess file.
GET /a/ => a/index.php
GET /a/b/ => a/b/index.php
GET /a/b/c/ => a/b/index.php
This URL mapping will give you pretty URLs in PHP without needing t...
Written by Sean Behan on 10/20/2017
How to Emulate Double Tap for Progressive Web Apps (PWA) iOS and Android
The double tap event isn't supported in libraries like jQuery Mobile (out of date anyway). But coding up your own function is very easy.
We will compare time in milliseconds between tap or click, events. The reason for both tap and click events is due ...
Written by Sean Behan on 04/08/2018