HNHacker News
TopNewBestAskShowJobs

nicolasMLV

33 karma · joined January 9, 2015

twitter.com/nicolasmlv
submissionscomments
nicolasMLV··on Django zero-downtime migrations for Postgres that respect database locks
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.

nicolasMLV··on BreezyPDF Lite: HTML to PDF generation as a Service
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}"`

nicolasMLV··on Modern Front-end in Rails
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.

nicolasMLV··on Ask HN: Which developers do you closely follow?
David Heinemeier Hansson, CTO of Basecamp and Creator of Ruby on Rails https://www.twitter.com/dhh
nicolasMLV··on Vue.js is easier to learn than jQuery
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>
nicolasMLV··on Karabiner – Easy Keyboard Remapping for OS X
been using it for 1 year to swap keys (beer+keyboard accident...) and it works well
nicolasMLV··on Ask HN: How much do you make in London?
In 2013 I declined an offer (first job, graduate): software dev in bigco (IT Provider travel industry), £38K
nicolasMLV··on Stepping Backwards from AngularJS to JQuery – An Experiment
yes, that is event delegation : https://learn.jquery.com/events/event-delegation/
nicolasMLV··on Stepping Backwards from AngularJS to JQuery – An Experiment
You can use event delegation for button handling : `$(document).on('click', '.button-list', my_function);`

https://learn.jquery.com/events/event-delegation/

nicolasMLV··on Ruby on Rails Tutorial
Great but Turbolinks 5 and Action Cable (web sockets) are missing
nicolasMLV··on My condolences, you’re now the maintainer of a popular open source project
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?)
nicolasMLV··on My time with Rails is up
Here is a new blogpost from DHH "Provide sharp knives"

https://m.signalvnoise.com/provide-sharp-knives-cc0a22bf7934

nicolasMLV··on Show HN: Open Hunt – an open and community-run alternative to Product Hunt
Just been removed from https://www.producthunt.com/upcoming although 20 upvotes