type StringBool = "true"|"false";
interface AnyNumber { prev?: any, isZero: StringBool };
interface PositiveNumber { prev: any, isZero: "false" };
type IsZero<TNumber extends AnyNumber> = TNumber["isZero"];
type Next<TNumber extends AnyNumber> = { prev: TNumber, isZero: "false" };
type Prev<TNumber extends PositiveNumber> = TNumber["prev"];
#!/bin/bash | |
# Provides a way for a root process to perform a notify send for each | |
# of the local desktop users on this machine. | |
# | |
# Intended for use by cron and timer jobs. Arguments are passed straight | |
# to notify send. Falls back to using wall. Care must be taken to | |
# avoid using this script in any potential fast loops. | |
# | |
# X11 users should already have a dbus address socket at /run/user/<userid>/bus | |
# and this script should work without requiring any initialisation. Should |
By: @BTroncone
Also check out my lesson @ngrx/store in 10 minutes on egghead.io!
Update: Non-middleware examples have been updated to ngrx/store v2. More coming soon!
Table of Contents
I am deploying with this IAM using Codeship and Circle CI to Elastic Beanstalk. I had a lot of trouble with this config. I talked to the aws support for about 6 hours until this worked properly, so, I guess it is worth to share.
UPDATE: In the end, I have to use the AWSElasticBeanstalkFullAccess
policy. My custom policy keep breaking every week with some new added permission or some EB internal change. Anyway, the IAM I was using is below.
This works for me with CircleCI and EB Cli.
{
"Version": "2012-10-17",
"Statement": [
{
- install jspm beta:
npm install -g jspm@beta
- set up your project:
jspm init
- install dependencies:
jspm install angular2 reflect-metadata zone.js es6-shim
This will create a jspm_packages
folder, and a config.js
file.
Open the config.js
file - this file manages options for the System.js loader - tweak it as appropriate
An IAM user policy document to give minimal rights for deploying an Elastic Beanstalk application.
Where:
REGION
: AWS region.ACCOUNT_ID
: AWS account ID.APPLICATION_NAME
: Desired target Elastic Beanstalk application name(space).IAM_INSTANCE_PROFILE_ROLE
: The instance profile (IAM role) Elastic Beanstalk EC2 instaces will run under.
# Hello, and welcome to makefile basics. | |
# | |
# You will learn why `make` is so great, and why, despite its "weird" syntax, | |
# it is actually a highly expressive, efficient, and powerful way to build | |
# programs. | |
# | |
# Once you're done here, go to | |
# http://www.gnu.org/software/make/manual/make.html | |
# to learn SOOOO much more. |
var sh = require('shelljs'); | |
function annotateFile (filePath) { | |
console.log('annotate ' + filePath); | |
sh.exec('ng-annotate -a ' + filePath + ' -o ' + filePath); | |
} | |
function annotateFolder (folderPath) { | |
console.log("annotate Folder " + folderPath); | |
sh.cd(folderPath); |
npm update -g
updates all global packages and their dependencies, see npm/npm#6247.
- Either use the shell script or windows batch here instead.
#!/bin/sh | |
set -e | |
set -x | |
for package in $(npm -g outdated --parseable --depth=0 | cut -d: -f3) | |
do | |
npm -g install "$package" | |
done |