Skip to content

Instantly share code, notes, and snippets.

# bash/zsh completion support for core Git.
#
# Copyright (C) 2006,2007 Shawn O. Pearce <spearce@spearce.org>
# Conceptually based on gitcompletion (http://gitweb.hawaga.org.uk/).
# Distributed under the GNU General Public License, version 2.0.
#
# The contained completion routines provide support for completing:
#
# *) local and remote branch names
# *) local and remote tag names
@jasonaden
jasonaden / webpack.config.js
Created October 12, 2017 17:22
Importing from 'rxjs/operators'
// Require the version of Rx you want to use (_esm5 or _esm2015)
const rxPaths = require('rxjs/_esm5/path-mapping');
var config = {
// Other config options...
resolve: {
extensions: [".ts", ".js"],
modules: [path.resolve('./src'), 'node_modules'],
// Use the "alias" key to resolve to an ESM distribution
@jasonaden
jasonaden / notes.md
Last active December 8, 2017 01:28
Angular Router Refactor Notes

ROUTER NOTES

The Angular router is loved for the features it provides, but is also a sore spot in terms of bugs, testability, edge cases causing errors during implementation, and bundle size. We would like to improve heavily on all these areas. Ideally this could be done without breaking changes so it could be released in v6. While some of the items below can be done in that way, there may be advantages to forking to a new package that would use the same concepts and much of the same core implementation, but do so with treeshakability and simplicity in mind to help address the sore spots.

These are some notes about how to get to this goal.

DESIGN

Testing Improvements

@jasonaden
jasonaden / notes.md
Last active November 17, 2017 07:55
Angular Class Notes

Goals

  • Basic understanding of how to create an Angular application
  • Hands-on experience with fundamental pieces of the Angular platform
  • A good idea of "what's next" to continue learning journey

Links

@jasonaden
jasonaden / notes.md
Last active January 5, 2018 14:44
common/router

@angular/common/router

Store

  • DONE Create RouterStore to hold RouteConfig objects
  • Helpers:
    • DONE getConfig(state: RouterState, id: number)

URL

@jasonaden
jasonaden / notes.md
Last active January 19, 2018 23:31
Updates to RxJS Types

Observer:

  • Seems like it's okay. There's PartialObserver<T> and Observer<T> as the main exports.
  • Subscription is currently a class implementation. ISubscription is closest to the spec, and AnonymousSubscription is any object returning an unsubscribe() method.
  • ISubscription should be renamed to Subscription. This means the current Subscription class (which is used almost exclusively in type position) would be renamed to RxSubscription. See description below in Observable for how RxSubscription and Subscription would be implemented and used.

Subscriber:

@jasonaden
jasonaden / README.md
Last active January 24, 2018 09:44
Readme for example library

Sample Packaging Application

This app was put together to show how to create and distribute an Angular library. It corresponds with the talk given at the Angular Mountain View Meetup (video here).

The steps below correspond to commits in this repo (after initial setup) so you should be able to refer to the individual commits to see the changes made.

Steps

Step 0:

@jasonaden
jasonaden / ROADMAP.md
Last active February 3, 2018 00:34
Angular Router Roadmap

Proposed Roadmap

Overall vision for this year with Angular Router is to: a) stabilize the router we have, and b) implement a new router to achieve treeshakability, lazy loading, and ease of use.

v6

We want to land key features to help incentivize upgrade to v6. Additionally, there are critical bug fixes that are best suited for a major release due to the possibility of unforseen edge cases causing minor breaking changes.

v6.0.0-beta.3

I looked at the issue on the weekend, but wanted to think more about it to see how it should be done and to put together real examples.
These are my thoughts.
## Observation 1: We need tot know when app is atable
To be able to restore scrolling position, we need to know when the application is stable. This cannot be known in a general fashion, it is only known in the context of a particular application.
To illustrate why this is the case, let's try to define stability.
@jasonaden
jasonaden / current-implementation.ts
Last active September 20, 2018 18:06
Route Guard Redirect Options
/**
* Currently most people run guards in this way, with redirects happening inside the guard itself.
* There are a few issues with this, but one is that guards run asynchronously. So if multiple
* `CanActivate` guards perform a redirect, there isn't a way to guarantee the sequence and
* therefore difficult to guarantee what page the user will land on.
*
* NOTE: Guards run async, but all CanDeactivate guards will run before CanActivate
*/
// Simple async auth guard