There are two ways to create an SSH tunnel, local and remote port forwarding (there’s also dynamic forwarding, but we won’t cover that here). The best way to understand these is by an example, let’s start with local port forwarding.
Imagine you’re on a private network which doesn...
CTags generates index file of all your classes, methods and all other identifiers. You can use that index in your editor to jump straight to the methods you’re interested in. In this article, I’ll show you how to use them with Vim and Rails.
A few years ago there used to be a motto saying Skinny controllers, fat models. It was good at the time, because people thought all of the application code belonged into the controllers, and it helped them realize that it’s good to have just a simple controller layer and push things...
In the following tutorial we’ll create a simple Ember.js app for logging your water intake. Besides learning the basics of Ember.js, you will also learn how to use Ember App Kit.
Those of us who come from Rails aren’t surprised when we see something like 5.weeks.from_now
or 3.days.ago + 2.hours
, which makes working with dates much easier. But PostgreSQL got your back on this as well, you can just use the builtin functions and get most of the same functionality...
This article is a sequel to our PostgreSQL series, which is aimed to teach you how to get the most out of your database. You might have been led by Active Record (or Rails in general) that it is a good idea to completely abstract away the database, but that it’s hardly ever possible...
We all know this. You get something to work on your own development machine, but don’t really feel confident enough to do the same on a production box. In development, you can always wipe out everything and start over. You cannot do the same in production.
Fortunately, Redis has...
Connecting to a database
$ psql postgres # the default database
$ psql database_name
Connecting as a specific user
$ psql postgres john
$ psql -U john postgres
Connecting to a host/port (by default psql
uses a unix socket)
$ psql -h localhost -p 5432 postgres
You can also...
Rails has always had a nice way of sanitizing user input coming from ubiquitous forms. Up until Rails 3, the solution was to list accessible fields right in your models. Then Rails 4 came along and introduced a different solution - strong_parameters
, allowing you to take a greater...
I’ve been a fan of Ember Data since the day I started working with Ember.js. It felt so easy in the beginning, I could just create a model and it would work out of the box with my JSON API. Life was fun.
I started using it more and more and unfortunately started hitting a brick...
This is the blog of sensible.io, a web consultancy company providing expertise in Ruby and Javascript.