const curry = (fn, ...cache) => (...args) => {
const all = cache.concat(args);
return all.length >= fn.length ? fn(...all) : curry(fn, ...all);
};
<!-- wInViewRoot directive is needed to specify the `root` for `IntersectionObserver` and some other it's options e.g. `margin` --> | |
<div class="container" wInViewRoot="viewport"> | |
Any content can be here | |
<w-in-view-item> | |
<!-- Content will be replaced by a placeholder <div> with the same height as original content. | |
Also `InViewItemComponent`s change detector will be detached when it become invisible which means | |
all the content's change detectors won't be reachable and will be inactive as well. --> | |
</w-in-view-item> | |
...or any other content can be here | |
<w-in-view-item> |
import { | |
Component, | |
OnInit, | |
Input, | |
ViewChild, | |
ElementRef, | |
HostBinding | |
} from '@angular/core'; | |
@Component({ |
These rules are adopted from the Angular commit conventions.
# remove local tag | |
git tag -d tagname-123 | |
# remove remote tag | |
git push origin :refs/tags/tagname-123 | |
# delete multiple tags by patterns | |
for tag in $(git tag -l '[production|tusur]*'); do git tag -d $tag; git push origin :refs/tags/$tag; done |
Locate the section for your github remote in the .git/config
file. It looks like this:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = [email protected]:joyent/node.git
Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/*
to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:
var GithubAPI = require('github'); | |
var child_process = require('child_process'); | |
var github = new GithubAPI({ | |
version: '3.0.0', | |
}); | |
github.authenticate({ | |
type: "oauth", | |
username: 'DevVersion-Bot', |
// Usage | |
// | |
//<md-dialog rc-drag="md-toolbar" ng-cloak> | |
// <form> | |
// <md-toolbar> | |
// ... | |
// </md-toolbar> | |
// <md-dialog-content> | |
// ... | |
// </md-dialog-content> |
I fell in love with CoffeeScript a couple of years ago. Javascript has always seemed something of an interesting curiosity to me and I was happy to see the meteoric rise of Node.js, but coming from a background of Python I really preferred a cleaner syntax.
In any fast moving community it is inevitable that things will change, and so today we see a big shift toward ES6, the new version of Javascript. It incorporates a handful of the nicer features from CoffeeScript and is usable today through tools like Babel. Here are some of my thoughts and issues on moving away from CoffeeScript in favor of ES6.
While reading I suggest keeping open a tab to Babel's learning ES6 page. The examples there are great.
Holy punctuation, Batman! Say goodbye to your whitespace and hello to parenthesis, curly braces, and semicolons again. Even with the advanced ES6 syntax you'll find yourself writing a lot more punctuatio
##Introducing ngAria
A new feature released in Angular 1.3.0 is the accessibility module: ngAria. As someone involved in with the development of this community-driven module, I thought it might be helpful to introduce ngAria. I'll also explain what the module can’t do and what issues you must consider when building accessible, single-page web applications with AngularJS.
The goal of ngAria is to improve Angular's default accessibility by enabling common ARIA attributes for directives. Using ngAria is as simple as requiring the ngAria module in your application. ngAria hooks silently hooks into standard AngularJS directives and quietly injects accessibility support into your application at runtime.
The list of supported directive attributes is currently limited; but we are identifying other ways the module can improve accessibility by default. To explain the current state