bash pipe exit code
If you pipe a command to another, and want to keep the exit code, you can use one of these 2 ways:
Or
adding a custom angular validator
- Fun validator, check if an exercise is one of the big 3:
-
If the field is not valid, then myForm.myFieldName.$error.compoundExercise will be true
-
Checking if the field is valid:
git pull with rebase
To configure git to do a pull with rebase everytime:
And to setup an existing branch in the same way:
know if you're running under zeus
The presence of “ZEUS_MASTER_FD” variable, tells you if you’re running under zeus.
directive with controller in angular
Been trying to get a directive to use a controller method. I had this:
And it wouldn’t react. The problem was that the method had to be dined on the scope:
accessing the target of a click in angularjs
Here’s how to access the target of a click event:
And in your method, you can access the target via $event.target
calling a builtin filter from another angular filter
I needed to call dateFilter from one of my filters. This is how I’ve done it: