Logo Logo Logo Logo Logo
  • home
  • Blog
  • Pet Projects
  • About
  • home
  • Blog
  • Pet Projects
  • About
generales, shell / 10.11.2016

Git: squashing many commits into only one

Sometimes when you are doing some tests or trying some new configurations in your project you end up with many commits with generic messages or maybe you were working on a big feature and before creating your pull request you need to update your branch...

0 Comments
Continue Reading
0 Likes
generales, Rails / 25.10.2016

Organizating your files in rails: Namespaces versus classes suffixes (MyClassService/MyClassJob)

In this short post I will review some of the different ways you can organize your classes using a namespaces or without it and just creating a new folder and place there your classes and adding a suffix. Let's start by checking the different ways you...

0 Comments
Continue Reading
0 Likes
apis, Rails, web applications / 05.10.2016

Rails: Respond json data in a controller based on json files

Sometime let's say you want to be able to reproduce an issue that is happening in the production environment so in case that your service is built as an API and responding in JSON format, maybe you can open that endpoint and download the JSON...

0 Comments
Continue Reading
0 Likes
frontend, Frontend Design, web applications / 30.04.2016

Show special message when the browser is out of date (or it is Internet explorer) css style

This is an example of the css style you can show to your visitors when they are using an out of date browser or an older Internet explorer version especifically. https://jsfiddle.net/heridev/xtujn62d/4/ This is how it looks the style: ...

0 Comments
Continue Reading
0 Likes
generales, hosting / 27.04.2016

Naked domains, recommended DNS services

Pro-tip: when you want to setup naked domains(for example phocus.io) you need some control to setup it up and that's when you need to pay a DNS service, for many domains I'm using the dnsimple.com service and the service costs $5.00 dollars per month up...

0 Comments
Continue Reading
0 Likes
angular.js / 01.03.2016

How to allow only numbers with or without decimal values in Angular.js

The code is pretty simple: [javascript] angular .module('MyApp') .directive('numbersOnly', numbersOnly) [/javascript] [javascript] function numbersOnly(){ return { require: 'ngModel', link: function(scope, element, attrs, modelCtrl) { modelCtrl.$parsers.push(function (inputValue) { if (inputValue...

0 Comments
Continue Reading
0 Likes
Rails, Ruby / 13.01.2016

Rails migrations: Interpolate values/dynamic content

Did not know that you can interpolate values in you migrations, so that way you can have dynamic content in a default value in your model. This is the basic example: Gemfile [ruby] gem 'liquid' [/ruby] Your migration [ruby] class AddMyFieldToTableName < ActiveRecord::Migration def change add_column :table_name,...

0 Comments
Continue Reading
0 Likes
angular.js, frontend, generales, javascript frameworks / 11.12.2015

How to create your own SPA email marketing autoresponder with Angular.js and Rails 4

Hello there, I just want to share with you a couple of tutorials that will guide you and teach you how to create a real web application from Scratch using Rails 4 and Angular.js 1.4(the latest at this moment). If you don't know what Mailchimp, Aweber, Constant...

0 Comments
Continue Reading
0 Likes
javascript / 07.10.2015

Angular X-editable with Restangular remote validation

Working with edit in place using the Angular x-editable directive I needed to validate the data remotely before to close the edit form, actually if you want to do that there is an example here: http://vitalets.github.io/angular-xeditable/#validate-remote so I just wanted to add the same example for...

0 Comments
Continue Reading
0 Likes
generales / 02.09.2015

Adding indexes to Postgresql in Rails + concurrently indexes

In this post, I'm going to write down how to add indexes to your tables in Rails if you are using Postgresql. Primary keys You don't need to create these indexes manually PostgreSQL automatically creates an index for primary keys to enforce uniqueness If you want to add...

0 Comments
Continue Reading
0 Likes
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13

location

Colima, Colima, México

2022 elh.mx All rights reserved.

Drop me a message

heriberto's email for contact

heriberto’s email for contact