Skip to content

Instantly share code, notes, and snippets.

David Díaz dgdavid

Block or report user

Report or block dgdavid

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
minac /
Last active Mar 26, 2019
Recommendations for Portugal

Recommendations for Portugal

Carly and I are fortunate enough to know people from different parts of the World. Since Portugal and specifically Porto became famous in the tourist circuit we keep getting asked for recommendations, so we joined together a bunch of things we had written to different friends and make it a blog post so that it's easily shareable. We hope it is useful for you. If you like it then (shameless plug), consider coming on one of our food tours in Porto to get to know the local culture through food and wine with amazing guides.

DISCLAIMER: This is Carly and Miguel's research and opinion, not Taste Porto's, nor any formal guidebooks. Different people think and prefer different things, so proceed as you will.

Portugal sea and surf

The sea/ocean off the western coast of Portugal is cold year round, the Atlantic has no warm currents here, and there is a frequent nortada (north wind) which makes swimming quite cold. The positive side of it is that

alekseykulikov /
Last active Feb 20, 2019
SUIT CSS naming convention for React.js application

Recently CSS has got a lot of negativity. But I would like to defend it and show, that with good naming convention CSS works pretty well.

My 3 developers team has just developed React.js application with 7668 lines of CSS (and just 2 !important). During one year of development we had 0 issues with CSS. No refactoring typos, no style leaks, no performance problems, possibly, it is the most stable part of our application.

Here are main principles we use to write CSS for modern (IE11+) browsers:

View Testing Modules with

It can be difficult to test the different scenarious for a module intended for use by including in another class.

If the class is statically defined in the spec, any later definitions extend, not replace, the first definition - which can cause test issues and breaks isolation between examples.

RSpec.describe SomeModule do
  class SomeIncluder
    include SomeModule
View inflections.rb
# Be sure to restart your server when you modify this file.
# Add new inflection rules using the following format
# (all these examples are active by default):
ActiveSupport::Inflector.inflections do |inflect|
# inflect.plural /^(ox)$/i, '\1en'
# inflect.singular /^(ox)en/i, '\1'
# inflect.irregular 'person', 'people'
# inflect.uncountable %w( fish sheep )
inflect.plural /(or)$/i, '\1es'
You can’t perform that action at this time.