nicolasMLV

Joined 11 years ago

Karma
33
Submissions
17
Member since
Jan 9
twitter.com/nicolasmlv
View on Hacker News

Recent submissions

Comment · 8 years ago
Rails uses foreign keys by default, usually I generate a migration file with `rails generate migration AddThisToThing this:references`

Then this line is generated `add_reference :things, :this, foreign_key: true`

and then we call the migration, and there is the foreign key.

Comment · 8 years ago
It is mainly a wrapper around this chrome headless command : (maybe you only need that)

`#{chrome_alias} --headless --disable-gpu --print-to-pdf="#{pdf_path}" "#{html_url}"`

Comment · 9 years ago
Turbolinks is the official Front-end part of Rails and it works very well, but there is no mention of it in the article neither in the hackernews comments, so i think it is under-used.

There's also turbolinks-ios and turbolinks-android, I built my mobile apps with minimal knowledge of Swift and Kotlin.

Comment · 9 years ago
Comment · 10 years ago
You could simplify this

  <script>
    var counter = 0;
    $(document).ready(function() {
      var $output = $('#output');  
      $('#increment').click(function() {
        counter++;
        $output.html(counter);
      });
      $output.html(counter);
    });
 </script>
with

  <script>
    var counter = 0;
    $(document).on('click', '#increment', function() {
        counter++;
        $('#output').html(counter);
    });
  </script>
Comment · 10 years ago
been using it for 1 year to swap keys (beer+keyboard accident...) and it works well
Comment · 10 years ago
In 2013 I declined an offer (first job, graduate): software dev in bigco (IT Provider travel industry), £38K
Comment · 10 years ago
Comment · 10 years ago
Comment · 10 years ago
Great but Turbolinks 5 and Action Cable (web sockets) are missing
Comment · 10 years ago
Let's hope Github will find a way for users to be able to 'tip' maintainers. I concede it is very hard to find the solution (Who? When? How much?)
Comment · 10 years ago

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton