Monthly Archives: April 2017

Change the Default Terminal Editor in Debian

Debian comes with a very handy utility called update-alternatives that helps to set default tools for various tasks. It is possible for several programs fulfilling the same or similar functions to be installed on a single system at the same time. … Continue reading

Posted in Linux | Tagged | 1 Comment

Don’t forget the -i

I spent way too much time troubleshooting an issue I was having with sed today. This is a common theme sometimes where I spend upwards of an hour debugging something that is ridiculously obvious. I was trying to replace a … Continue reading

Posted in Linux | Tagged , | Leave a comment

Serving a Static Home Page in Rails

TIL while working on this issue that if you dump a file into public/index.html then rails will just serve that up for you. A lot of tutorials out there talk about making a static pages controller, which seems like overkill … Continue reading

Posted in Hacking | Tagged | Leave a comment

Do not Install Karma Globally

Wow, I spent so long trying to figure out why the hell karma was not working for me, it turns out its because it was installed globally. For instance. In my projects package.json I had: “scripts”: { “test”: “karma start … Continue reading

Posted in Hacking | Tagged , , | Leave a comment

Injecting Stuff into your Python Path

Similar to a previous post where I wrote about how to run flask tests without installing your app, another common thing that you might want to be able to do is import your app from some arbitrary script. This is … Continue reading

Posted in Hacking | Tagged | Leave a comment

Using the Flask CLI

Who knew that flask had a cli? Previously I used to just use manage.py just like Django does it to “do stuff”. The CLI is great, but again it follows the theme of kind of wanting you to install your … Continue reading

Posted in Hacking | Tagged , | Leave a comment

Follow Me on Twitter CTA on Ghost and WordPress

The other day I read a post on Hacker News about premature optimization in web application development. This was an excellent post in its own right, but one thing that jumped out at me was the call to action from … Continue reading

Posted in Hacking | Tagged , , | Leave a comment

Using Font Awesome with Laravel

For some reason there is a whole thread on this seemingly simple tasks. In a bootstrapped Laravel 5.4 instance the following worked for me. Install Font Awesome with NPM npm install font-awesome Import font-awesome in your app.scss file // resources/assets/sass/app.scss … Continue reading

Posted in Hacking | Tagged | Leave a comment

Dockerized Laravel and MySQL for local development

Docker is awesome. Its also quite useful for local development. The following Dockerfile and docker-compose.yml will be helpful if you want to do laravel development inside of docker. I am using Ubuntu as a base, but you can probably use … Continue reading

Posted in Hacking | Tagged , , | Leave a comment

Safari JSON View

I have been using safari lately, for whatever reason. While going through the second rails course on coursera I came across this handy extension that pretty prints JSON in safari. JSONView I think this might be built into firefox or … Continue reading

Posted in Hacking | Tagged , | 1 Comment