== Limitations
* Linux only
-* Some commands cannot be run (e.g. sysctl)
== Create a Disk (OPTIONAL)
* Many ways to do this.
* ZFS and btrfs recommended
** https://lxd.readthedocs.io/en/latest/storage/
-
-[source,sh]
---------------------------------------------------------------------------
-lxc storage create pool1 btrfs source=/VM
---------------------------------------------------------------------------
+* ZFS is more stable and easier to set up.
== Init LXD and Create an Image
[source,sh]
--------------------------------------------------------------------------
-sudo lxd init # tell it about the storage pool
+sudo lxd init # create new zfs pool from a partition
sudo lxc launch ubuntu:16.04 eg-dev
sudo lxc exec eg-dev -- bash
--------------------------------------------------------------------------
--- /dev/null
+= Visual Studio Code For Developers
+:author: Bill Erickson, Software Development Engineer, King County Library System
+:email: berickxx@gmail.com
+:date: Evergreen Conference 2019
+:duration: 5
+:backend: slidy
+:max-width: 45em
+:deckjs_theme: web-2.0
+
+== 5 Angular / Typescript Tips
+
+== Getters and Setters
+
+[source,javascript]
+-------------------------------------------------------------------------
+private _msg: string;
+set msg(s: string) {
+ console.debug('Got a new msg:', s);
+ this._msg = s;
+}
+get msg(): string {
+ return this._msg;
+}
+
+this.msg = "hello"; // Produces console message
+// NOT this.msg("hello") or this.msg()
+-------------------------------------------------------------------------
+
+== Async Functions
+
+* Any function that returns a promise can be prefixed with the 'async'
+ keyword
+* Any 'async' function that calls another 'async' function can 'await'
+ the results of the called function.
+* The result of the called function is the value passed to the promise
+ resolution.
+* You can write async code that looks like sync code.
+
+== Async Functions: Promise Chain
+
+[source,javascript]
+-------------------------------------------------------------------------
+async modifyCar(): Promise<any> {
+ return loadCar()
+ .then((car: Car) => this.colorDialog.open(car))
+
+ .then((color: string) => this.applyColor(color))
+
+ .then((cost: number) => this.addCost(cost))
+}
+-------------------------------------------------------------------------
+
+== Async Functions: await
+
+[source,javascript]
+-------------------------------------------------------------------------
+
+async modifyCarColor(): Promise<any> {
+
+ const car: Car = await loadCar();
+
+ const color: string = await this.colorDialog.open(car);
+
+ const cost: number = await this.applyColor(color);
+
+ return this.addCost(cost);
+}
+-------------------------------------------------------------------------
+
+== Async Functions: loadCar()
+
+[source,javascript]
+-------------------------------------------------------------------------
+async loadCar(): Promise<Car> {
+ return new Promise((resolve, reject) => {
+ // Network stuff that takes time...
+ resolve(myCar);
+ });
+}
+-------------------------------------------------------------------------
+
+
+
+