How To Export A MySQL Database to JSON, CSV and XML with Ruby and the ActiveRecord Gem
It's trivial to export data from a mysql database with Ruby and ActiveRecord. All you have to do is establish a connection and define a class that represents the table.
require 'rubygems'
require 'active_record'
ActiveRecord::Base.establish_con...
Written by Sean Behan on 06/23/2012
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 Fix Pypi Upload failed (403): Invalid or non-existent authentication information.
If you run into authentication failure when trying to upload packages
Submitting dist/ to https://upload.pypi.org/legacy/
Upload failed (403): Invalid or non-existent authentication information.
error: Upload failed (403): Invalid or non-existent...
Written by Sean Behan on 03/02/2017
Date and Time Helpers in Rails
Just for reference http://api.rubyonrails.org/classes/ActionView/Helpers/DateHelper.html#M001695
This post was created about ago
Written by Sean Behan on 06/17/2012
Install Rmagick on Ubuntu with MagickWand
apt-get install librmagick-ruby1.8
apt-get install libmagickwand-dev
gem install rmagick
The last command will spit out a bunch of "No definition" comments. There are no rdocs available and this is why.
Written by Sean Behan on 06/17/2012