Very quick, I wanted to use Get with a query that contained other tables. The documentation does not have a lot of examples so here we go. Given the following database schema CREATE EXTENSION pgcrypto; CREATE TABLE content_types ( id UUID PRIMARY KEY DEFAULT gen_random_uuid(), name VARCHAR(255), created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, deleted_at TIMESTAMP DEFAULT NULL ); CREATE TABLE content ( id UUID PRIMARY KEY DEFAULT gen_random_uuid(), content_type_id UUID REFERENCES content_types(id) ON DELETE CASCADE ON UPDATE CASCADE, content TEXT, created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, deleted_at TIMESTAMP DEFAULT NULL ) I want to query and return a content row with its content_type, here is the struct I want to return....
Install PHP7
PHP7 was released this month, exciting! So how do you get ahold of it? ...
Preparing Integers With Doctrine
I recently had an issue with binding an integer to a select statement with doctrine and postgresql. ...
Getting Started with Gorilla MUX
This is going to be short and sweet. I have been looking at getting into Go for awhile but lacked incentive. That has, as of a week ago, changed and it’s full speed ahead. For this I will be using Gorilla MUX. If you haven’t taken a look at the Gorilla toolkit yet I highly recommend it. I really enjoy using it, the use as individual components really resonates with me and my style of coding....
Docker: Containing Madness
Recently we had one of our important clients come to us with a node.js application they needed updated. I’m not sure of the circumstances surrounding this application but it looked and felt like a ball of spaghetti was thrown in my face. I punted the modifications to another developer in favor of doing the deployment with docker and supervisord. The Problem This node.js application has many assumptions about libraries and file locations that make me cringe, for example it simply won’t work unless packages are installed globally and locally....
Splitting Mysql Dumps
The version of phpMyAdmin on Rackspace Cloud Sites has a hard limit of 16Mb for imported SQL. I recently had to migrate a database that was over 500Mb. The solution was simple but tedious, export the database schema first and import it in phpMyAdmin then separate the data into many separate files below 16Mb. I came up with a lot of ridiculous solutions using python, perl, combinations of science and voodoo until I realized the solution already existed, Linux....
Jenkins CI Deployment with Bitbucket
I recently had someone ask me how to get started with Jenkins-CI, git, and ssh. My team is using it now for a CI-git deployment scheme but I was not the one to install or configure it. I didn’t really want to let down my friend with an “I don’t know, google it” answer so I spun up a new EC2 instance on Amazon AWS, installed Jenkins, pushed a new private repo to bitbucket, pulled and deployed that push on my Jenkins test server....