Logo Logo Logo Logo Logo
  • home
  • Blog
  • Pet Projects
  • About
  • home
  • Blog
  • Pet Projects
  • About
frontend, javascript, javascript frameworks, Jquery / 30.12.2016

Never use jsPDF library for pdf generation in client side

If you really want to show basic things and simple tables you can use jsPDF, other than that it has sooooo many limitations, at first glance looks really cool to be able to generate pdfs in the client side but after that you try to...

0 Comments
Continue Reading
0 Likes
cucumber, generales, Rails, rspec, Ruby, Testing / 26.12.2016

Rspec and Cucumber : Re run intermitent specs or cucumber features failures

Sometimes when you have a large test suite chances are that some of them fail randomly and when this happen you would not want to re run everything again so here it is the configuration I used to have for Rspec and cucumber in order...

0 Comments
Continue Reading
0 Likes
rspec, shell, Testing / 08.12.2016

Error with Carrierwave and FFaker::Avatar.image

If you're facing this error: could not download file: SSL_connect returned=1 errno=0 state=error: certificate verify failed It's because the FFaker::Avatar.image remote image returns a https image. This is for example how it looks my code: [ruby] post :create, { format: :json, version: 1, user: { avatar_url: FFaker::Avatar.image, username:...

0 Comments
Continue Reading
0 Likes
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
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12

location

Colima, Colima, México

2022 elh.mx All rights reserved.

Drop me a message

You would see here my email in a t-shirt soon…