Want fresh tech tips in your inbox?

My name is Sean Behan.

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

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

Let's connect on...


PhotoLocationChanger
Easily change the location on your photos and videos
Click here for more info about the app
PhotoDateChanger
Easily change the dates and times on your photos and videos
Click here for more info about the app
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

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


How to Log and Query SQL Queries Hitting Your Database with MySQL

Here is some code just in case you want to look at and query the queries hitting your MySQL database. Enter this from the mysql client console....


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 = "H...


How to Filter or Search HTML with Vanilla Javascript - No JQuery Required

The basic approach is to use the `document.querySelectorAll` to match certain elements, then manually set the display property to 'none' or 'block' (o...


How to Time Piped *nix Commands

If you want to time how long a piped bash command take, use the `time` command followed by your commands in parens like so.. time (ls -lha | wc -...


How to Parse Query Strings in PHP

Here is a quick snippet for parsing query strings in PHP. You can use the `parse_url` and `parse_str` methods. `parse_str` will create a variable for...


How to import CSV into SQLite3

To import a CSV file into SQLite is easy. sqlite3 my.db .mode csv .import path/to/file.csv name_of_table And done....


How to Cast an Array to an Object with PHP

It's short and sweet. $obj_from_array = (object)['key'=>'val']; echo $obj_from_array->key;...


How to Tag and Push a Release with Git

Set the `-a` and the `-m` flags like so git tag -a v1.0.0 -m "Note about the release goes here" Then to push the tag to a repository git...


How to Make an iOS App Icon from a File on the Command Line or Web Browser

If you need to make iOS app icon assets from a photo, take a look at the [Make App Icon](https://makeappicon.com/) website and API. They will let you...


Simple Way to Calculate the Odds of Something Happening

Here is a quick way to express a chance of something happening. This is an example in JavaScript that gives you a 1 in 3 chance of being true....


PHP Headers for Sending CSV File Downloads

If you would like to force a file download prompt to the user, instead of just outputting the text to the browser, use the following headers. <?ph...


XPath with HTML in PHP One Liner

Here is a one liner for using XPATH with HTML in PHP $doc = new DOMXPath(@DOMDocument::loadHTML(file_get_contents("https://www.reddit.com/r/PHP/")...


How to Calculate Age with PHP

Calculate age in PHP $your_birthday = '1982-08-29'; $difference = date_diff(date_create(), date_create($your_birthday)); $age = $differe...


How to Use Named Variables with Postgres and PHP PDO Driver

You can write reusable scripts with Postgres by taking advantage of named variables. A named variable starts with a `:` in your sql script. Here i...