Category Archives: tech
Surviving Git Submodules
Presentation Help Office Hours
The RETURNING Keyword in PostgreSQL
RETURNING
keyword in PostgreSQL gives an opportunity to return from the insert or update statement the values of any columns after the insert or update was run. I mentioned this in passing in a few of my talks that touch on PostgreSQL recently, and it often gets twitter comment so here’s a quick example of the RETURNING
keyword in PostgreSQL. The newest releases of PostgreSQL are excellent and I’m seeing many teams considering moving their traditional MySQL setups over – this is just one of the extra goodies that you get when you use PostgreSQL! Let’s look at an example. Continue reading Switching To Reveal.js for Presentations
Vagrant and Ansible for Dev Machines
Use Ngrok Dashboard from VM
This is a config setting but it can’t be supplied on the command line, instead create a file called ~/.ngrok2/ngrok.yml
and add the following line:
web_addr: 0.0.0.0:4040
This will enable you to then reach the web interface at [VM IP or hostname]:4040
.
Zap to Schedule Adding Todo List Items
Vagrant Box With This Name Already Exists
A VirtualBox machine with the name 'ubuntu-xenial-16.04-cloudimg' already exists.
Please use another name or delete the machine with the existing name, and try again.
There’s a stackoverflow question about this and a good answer (not the accepted one, the highest-voted one) which helped me a bit but it still wasn’t completely clear to me how to fix my problem and I had to dig about a bit. Continue reading
Heroku “No app specified”
--app app-name
to every single command. It seemed to happen when I moved my app to an organisation rather than having it on my personal account, but in fact the problem was that at the same time I did that, I set up the build server to deploy it – and so I removed the old heroku git remote and then never added the new one because I exactly shouldn’t be pushing to heroku from my laptop as we now deploy via Jenkins.
I was looking for some config file or something that heroku would read but what it actually does is look at whether any of your git remotes are heroku and if so, assume by default that you mean that project! The git URL is on the “Settings” screen from the Heroku web interface, and you just need to add it as a remote to your local project:
git remote add heroku [paste git url from settings screen]
Hopefully this helps someone else stop having to type --app app-name
every time they need to do something with their app, it was a tiny problem but quite an annoying one!