In order of first appearance in The Morning Paper.
| /** | |
| * Safari 10.1 supports modules, but does not support the `nomodule` attribute - it will | |
| * load <script nomodule> anyway. This snippet solve this problem, but only for script | |
| * tags that load external code, e.g.: <script nomodule src="nomodule.js"></script> | |
| * | |
| * Again: this will **not** prevent inline script, e.g.: | |
| * <script nomodule>alert('no modules');</script>. | |
| * | |
| * This workaround is possible because Safari supports the non-standard 'beforeload' event. | |
| * This allows us to trap the module and nomodule load. |
Below are many examples of function hoisting behavior in JavaScript. Ones marked as works successfuly print 'hi!' without errors.
To play around with these examples (recommended) clone them with git and execute them with e.g. node a.js
(I may be using incorrect terms below, please forgive me)
| function makeBackgroundBlack() { | |
| document.body.style.backgroundColor = '#000000'; | |
| } | |
| makeBackgroundBlack(); | |
| /* | |
| - browser parses html | |
| - browser sees <script> - blocks (and downloads if src attr) |
Hi Nicholas,
I saw you tweet about JSX yesterday. It seemed like the discussion devolved pretty quickly but I wanted to share our experience over the last year. I understand your concerns. I've made similar remarks about JSX. When we started using it Planning Center, I lead the charge to write React without it. I don't imagine I'd have much to say that you haven't considered but, if it's helpful, here's a pattern that changed my opinion:
The idea that "React is the V in MVC" is disingenuous. It's a good pitch but, for many of us, it feels like in invitation to repeat our history of coupled views. In practice, React is the V and the C. Dan Abramov describes the division as Smart and Dumb Components. At our office, we call them stateless and container components (view-controllers if we're Flux). The idea is pretty simple: components can'
| <?xml version="1.0" encoding="UTF-8" ?> | |
| <Data> | |
| <Series> | |
| <id>83462</id> | |
| <Actors>|Nathan Fillion|Stana Katic|Molly C. Quinn|Jon Huertas|Seamus Dever|Tamala Jones|Susan Sullivan|Ruben Santiago-Hudson|Monet Mazur|</Actors> | |
| <Airs_DayOfWeek>Monday</Airs_DayOfWeek> | |
| <Airs_Time>10:00 PM</Airs_Time> | |
| <ContentRating>TV-PG</ContentRating> | |
| <FirstAired>2009-03-09</FirstAired> | |
| <Genre>|Drama|</Genre> |
| # ----------------------------------------------- | |
| # ENSURE GIT REPOSITORIES | |
| - name: Git | Ensure server repository | |
| sudo_user: git | |
| git: repo={{ upstream }} | |
| dest={{ repo_dir }} | |
| bare=yes | |
| update=no | |
| tags: git |
Primary differences between SSH and HTTPS. This post is specifically about accessing Git repositories on GitHub.
plain Git, aka git://github.com/
-
Does not add security beyond what Git itself provides. The server is not verified.
If you clone a repository over git://, you should check if the latest commit's hash is correct.
| import React from 'react'; | |
| import {Link as ReactLink} from 'react-router'; | |
| export default class Link extends React.Component { | |
| parseTo(to) { | |
| let parser = document.createElement('a'); | |
| parser.href = to; | |
| return parser; | |
| } | |
| isInternal(toLocation) { |