Today I Learned

TIL, 2018-04-02, More React: Getting state from JSON, Web Font loader.

Musings, Chef/Reliably Deploying Rails apps

  • WTF DOES OHAI do?
  • Fixing chef problems: update the thing.
  • berks update postgresql
  • berks vendor: If you remove a cookbook, rerunning this doesn’t remove the stuff in the berks-cookbooks.

Musings, React:

$ npm install webfontloader --save

import WebFont from 'webfontloader';

WebFont.load({
  google: {
    families: ['Titillium Web:300,400,700', 'sans-serif']
  }
});
  • Web performance/render blocking CSS.
    • Usually, rendering is blocked until CSS is available, because without CSS, the page will be relatively unusable. This leads to a “flash of unstyled content”.
    • CSS’s media types and media queries allow us to address these use cases:
      • <link href="print.css" rel="stylesheet" media="print"> and <link href="other.css" rel="stylesheet" media="(min-width: 40em)">
    • Make sure to keep your CSS lean, deliver it as quickly as possible, and use media types and queries to unblock rendering.
    • Media types and media queries allow us to mark some CSS resources as non-render blocking.
    • The browser downloads all CSS resources, regardless of blocking or non-blocking behavior.
  • CSS things!
    • :root
    • CSS variables and inheritance.
    • Extracted Li

Musings, Back-end

  • DNS Resolver performance explained
    • CloudFlare was the fastest DNS for 72% of the locations.
  • You can make multiple directories at the same time via mkdir dir1 dir2?
  • tree OMG I forgot about this.

This project is maintained by daryllxd