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
fs = require('fs'); | |
fs.readdir('dist/', (err, files) => { | |
files = files.filter(file => { | |
if(file.indexOf('.gz') != -1) { | |
return false; | |
} | |
if(file.indexOf('favicon') != -1) { | |
return false | |
} |
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
ng new my-project | |
cd my-project | |
# We have a working v2.4.x project now! | |
ng build -prod | |
# Let's save a working copy of the 2.4.x project | |
mv dist dist-2.4.x | |
# Now let's update to the latest version of Angular |
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
for i in *; do cd $i; npm link; cd ..; done | |
# Install latest stable | |
npm install @angular/{common,compiler,compiler-cli,core,forms,http,platform-browser,platform-browser-dynamic,platform-server,router}@latest --save --save-exact | |
# Install latest next | |
npm install @angular/{animations,common,compiler,compiler-cli,core,forms,http,platform-browser,platform-browser-dynamic,platform-server,router}@next typescript@latest --save --save-exact | |
#Install tagged master release |
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
<!-- regex this with that --> | |
<md-input (.*)></md-input> | |
<md-input-container><input mdInput $1></md-input-container> |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
</head> |
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
//Found this in some code I borrowed: | |
(() => { | |
var main = () => { | |
chrome.runtime.getPackageDirectoryEntry(function (root) { | |
var icon = "icon2.png"; | |
root.getFile(icon, {}, function (fileEntry) { | |
fileEntry.file(function (file) { | |
var reader = new FileReader(); | |
reader.onloadend = function (e) { |
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
npm install angular-cli@latest -g | |
npm install angular-cli@latest --save-dev | |
npm install @angular/{common,core,compiler,compiler-cli,forms,http,platform-browser,platform-browser-dynamic,platform-server}@latest @angular/router@latest zone.js@latest rxjs@latest firebase@latest angularfire2@latest @angular/material@latest --save | |
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 { Component, Input } from '@angular/core'; | |
import { Router } from '@angular/router'; | |
import { AngularFire, FirebaseListObservable } from 'angularfire2'; | |
import { Observable } from 'rxjs'; | |
declare var firebase: any; | |
interface Image { | |
path: string; |
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
find src -iname \*.ts | xargs sed -ibackup 's/moduleId: module.id//' |
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 { AppModule, enableProdMode, ApplicationRef } from '@angular/core'; | |
import { BrowserModule } from '@angular/platform-browser'; | |
import { AmesAppComponent } from './ames.component'; | |
import { FORM_DIRECTIVES, FormsModule } from '@angular/forms'; | |
import { ROUTER_DIRECTIVES, provideRoutes } from '@angular/router'; | |
import { FIREBASE_PROVIDERS, defaultFirebase, firebaseAuthConfig, AuthMethods, | |
AuthProviders, } from 'angularfire2'; | |
import { disableDeprecatedForms, provideForms } from '@angular/forms'; | |
import { routes } from './routes'; |