Define an API
module, that does the actual AJAX requests:
const API = {
/** Simple service for generating different HTTP codes. */
url: 'http://httpstat.us/',
/**
/** | |
* Тhe Extension API model is currently being standardized to browser.xxx, | |
* and some browsers are defining their own namespaces in the meantime | |
* (for example, Edge is using msBrowser). | |
* | |
* Fortunately, most of the API remains the same behind the browser. | |
* So, it’s very simple to support all browsers and namespace definitions. | |
* | |
* You’ll also need to use the subset of the API supported by all browsers: | |
* - Microsoft Edge: https://docs.microsoft.com/en-us/microsoft-edge/extensions/api-support |
I decided to open-source my development goals for the upcoming year(s). Here are my reasons why:
- Accountability. When I bring other people in my goal picture - my overall involvement is considerably higher
- Clarity. When I tell the world about some of my goals - I modify them. I take something from a discussion, something from another one, until my goal emerges in a new form - a much clearer one.
- Progress Measurement. Sharing my goals makes the progress measurement easier. Sometimes I use my friends as guides or supervisors. This helps me achieve more.
- Motivation. When I tell people about my goal something interesting happens. The mere facts that I tell to somebody else, acts like an incentive to me. It's not about accountability, but about being pumped up and ready to act. > 5. Connection. Sharing my goals with like-minded people helps me grow my social circle. Goals aside, the mere fact that you take the time to share something, to give details, to bring upd
<?php | |
/** | |
* GIT DEPLOYMENT SCRIPT | |
* | |
* Used for automatically deploying websites via github or bitbucket, more deets here: | |
* | |
* https://gist.github.com/1809044 | |
*/ | |
// The commands |
class Sortable extends React.Component { | |
componentDidMount() { | |
// Every React component has a function that exposes the | |
// underlying DOM node that it is wrapping. We can use that | |
// DOM node, pass it to jQuery and initialize the plugin. | |
// You'll find that many jQuery plugins follow this same pattern | |
// and you'll be able to pass the component DOM node to jQuery | |
// and call the plugin function. |