This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//http://es6console.com/iy0bc530/ | |
function compare_lists(full_list, partial_list) { | |
return full_list.filter( item => partial_list.indexOf(item) < 0 ) | |
} | |
let all_animals = ['dog', 'parrot', 'cat', 'mouse'] | |
let my_animals = ['dog', 'cat'] | |
let animalsdontown = compare_lists(all_animals, my_animals) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Injectable } from "@angular/core"; | |
import { Observable } from 'rxjs/Observable'; | |
import { CustomHttp } from "./customhttp"; | |
@Injectable() | |
export class MyService { | |
constructor(public http: CustomHttp) { | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Injectable } from "@angular/core"; | |
import { Http, Headers, RequestOptions } from '@angular/http'; | |
import { Observable } from 'rxjs/Observable'; | |
@Injectable() | |
export class CustomHttp { | |
constructor(public http: Http) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#commit all deleted files in Git? | |
git add -u . | |
#creating branch | |
git checkout -b your_branch | |
git push -u origin your_branch | |
#Teammates can reach your branch, by doing: | |
git fetch | |
git checkout origin/your_branch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var url = "something"; | |
$ | |
.when( $.ajax({url: url )) | |
.then( my_function_1 ) | |
.then( my_function_2 ) | |
.done( my_callback_function ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo npm uninstall -g grunt | |
sudo npm install -g grunt-cli | |
sudo grunt-init grunt-init-gruntfile | |
npm init |