My name is Sean Behan.

I write about #software, #SaaS, #consulting and #mobile app development

I work with #Python, #Ruby, #ReactJS and #Postgres

Let's connect on...


VocabReminder
English dictionary with notifications so you won't forget what you're studying!
Click here for more info about the app
VocabQuiz
The app that quizzes and scores you on your vocabulary!
Click here for more info about the app

From the Archives

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 __h...


How to Read Response Body HTML with Javascript Fetch Method with React Native

In React Native you see a lot of tutorials and articles using the `fetch` method when interacting with `JSON` APIs. It's great for this and the the pa...


How to Fix Raw query must include the primary key with Django ORM

When running raw SQL queries in Django you must include a primary key otherwise an invalid query exception is raised. Normally this is fine but when r...


Simple SQL for Counting New Signups

Here is a little snippet that will return new signups (or new records) for today select id, email, created_at::date date from signups where ema...


How to Find An SQLite Database with React Native and the iPhone Simulator.

I spent a few hours digging around my file system using `find` and `grep` hunting for my SQLite database that the iPhone Simulator was using for my Re...


Active Admin Rails 5 undefined method per_page_kaminari

If you run into this error in development, using Rails 5 and Active Admin NoMethodError - undefined method `per_page_kaminari' Try the followin...


Regex for Extracting URLs in Plain Text

Here is a Regex for extracting URLs from text. However, these links will not already be hyperlinked or source attribtues from images or iframes. T...


I Just Published My First PHP Package HTMLXPATH

I just wrote and published my first PHP package on Packagist.com. It's available on [packagist.org](https://packagist.org/packages/htmlxpath/htmlxpath...


Matching email addresses in Javascript

Matching email addresses in Javascript regex = /\b[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}\b/img "hello sean@example.com how are you? do...


How to Make Cross Database Queries with Postgres and DBLink Extension

Here are a few snippets for cross database queries. It's important to note that you must be explicit in enumerating the columns and types you are quer...


How to send email with Python, smtplib and Postmark

Here is a quick code snippet showing how to send email via SMTP with Postmark without any dependencies. It assumes you are using Heroku and have added...


Using Selenium to Drive Firefox Browser for Web Automation

There are a lot of practical uses for automating user behavior in a browser. Everything from testing your web application to logging into Twitter and...


How to Import/Export a Database from One Heroku App to Another Heroku App

Heroku is awesome! Let's say we want to copy a production database to a staging database. We can use the `pg:backups:restore` command to accomplis...


Linux Disk Usage Command Recursive

It's short and sweet! du -hs * If you run this command it will tell you the sizes of all the files and folder in the current directory. The...


Reshape an Array of Form Inputs for Flask with getlist()

This is how to reshape an array using Python without Numpy. This is a fairly simple task but it can be a little confusing to wrap your head around....