Hi

I'm Sean.

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

I code in #Python, #PHP, #Swift, #Ruby, #ReactJS and #Postgres


Random Blog Posts See more posts

Recursively Zip a Directory and Files on Linux
It's Short and sweet! Just remember that the finished zip filename is the first argument and the directory you wish to recursively zip comes after. zip -r name_of_your_directory.zip name_of_your_directory That's all. You might be intere...
Written by Sean Behan on 03/05/2017
Intercepting the Wordpress Loop with Pre_get_posts
#deprecated (see http://codex.wordpress.org/Function_Reference/query_posts#Post_.26_Page_Parameters) Using the "pre_get_posts" filter you can intercept the Wordpress loop and override or set attributes in the "$query" object. This is useful because you c...
Written by Sean Behan on 06/17/2012
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.
Written by Sean Behan on 12/03/2017
How to Create A Unix Timestamp or the Epoch in Python
It's a little convoluted. Seeing as it's a pretty common thing you use when programming computers one might think that there would be a quick and easy method for it. But from what I can tell there isn't. So here is a snippet that will give you a *nix Epoc...
Written by Sean Behan on 11/02/2013
How to Just Get SQL Statement Error with SQLAlchemy Python Database Wrapper
If you're working with SQLAlchemy, the best database driver for Python, and want to see only SQL syntax errors, you need to use the StatementError exception class. On it, is an attribute `orig`, that contains just the SQL syntax error... and not any data...
Written by Sean Behan on 05/10/2018