Manual ManyToMany Through with Django's ORM
Here is a code snippet that demonstrates how to set up a __ManyToMany through__ relationship in Django. In Rails, the equivalent would be called a __has_many through__ association.
If you set the __through__ argument on the ManyToManyField, Django wil...
Written by Sean Behan on 07/21/2017
How to Extract Time Information from a Natural Language String with a Regular Expression and PHP
You can easily extract time information from a string with a regular expression and PHP (or any language with regular expressions).
$str = "Here is how to extract time info.. like 4:30 PM and 2:10 AM from a string in PHP";
$rgx = "/\d{1,2}(:?\d...
Written by Sean Behan on 02/26/2018
Natural Dog Training
Natural Dog Training uses Wordpress to run a blog and content management system.
Custom design, theme and plugin development
Written by Sean Behan on 06/17/2012
TinyMCE Rich Text Editor: HELLO EDITOR Plugin Tutorial and Example
I wanted to create a button for the TinyMCE Rich Text Editor for Wordpress. It was tough to find good docs on the subject. There are a couple of useful posts out there but in general I found them lacking.
http://codex.wordpress.org/TinyMCE_Custom_Buttons...
Written by Sean Behan on 06/17/2012
How to Use Pretty URLs with Rails will_paginate Plugin
The will_paginate plugin for Rails uses a key/value assignment like ?page=2, rather than the pretty url formats such as /page/2 ... This is because url generation and mapping are handled by the routes.rb file. You'll need to modify the file so that rails ...
Written by Sean Behan on 06/17/2012