You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Instantly share code, notes, and snippets.
Marcel dos Santos
marcelgsantos
Tech passionate programmer, web lover, PHP & JavaScript coder, interested in architecture & DDD, FP enthusiast, ex-FEMUG-SP, PHPSP evangelist and OSS supporter.
I've done the same process every couple years since 2013 (Mountain
Lion, Mavericks, High Sierra, Catalina) and I updated the Gist each time I've
done it.
I kinda regret for not using something like Boxen
(or anything similar) to automate the process, but TBH I only actually needed to
these steps once every couple years...
CORS (cross origin resource sharing) is a mechanism to allow client web applications make HTTP requests to other domains. For example if you load a site from http://domainA.com and want to make a request (via xhr or img src, etc) to http://domainB.com without using CORS your web browser will try to protect you by blocking the response from the other server. This is because browsers restrict responses coming from other domains via the Same-Origin-Policy.
CORS allows the browser to use reponses from other domains. This is done by including a Access-Control headers in the server responses telling the browser that requests it is making is OK and safe to use the response.
Although PHP now has a number of features that allow you to control concurrency,
it was designed with the shared-nothing architecture philosophy.
Anything that needed to be shared was intended to be pushed down to a co-ordinated
robust database or a network filesystem. All state inside a PHP process was to be
short lived and only exist within a single PHP lifecycle, which is also the
lifecycle of an HTTP request and response.
Elm Destructuring (or Pattern Matching) cheatsheet
Should be work with 0.18
Destructuring(or pattern matching) is a way used to extract data from a data structure(tuple, list, record) that mirros the construction. Compare to otherlanguages, Elm support much less destructuring but let's see what it got !
This is a proposal for a lightning talk at the Reactive 2016 conference. If you like this, star the Gist.
Thinking metrics on React applications
In regular websites, it is common to send multiple events to track user clicks. Single Page Applications change the way you look at metrics. This is a talk about a simple pattern we created at Globo.com to manage a metrics layer for http://globoplay.globo.com. The talk will cover how to track user flow using Google Analytics and other services. We solved the challenge of tying metrics and components, keeping information across pages and having global data. Also some React, React Router and React Side Effects concepts like context, higher order components, history state will be covered.