This file contains hidden or 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
| #!/usr/bin/env bash | |
| input=$(cat) | |
| # ── Colors ─────────────────────────────────────────────────────────────────── | |
| readonly CLR_RED='\033[0;31m' # bar: high usage (≥80%) | |
| readonly CLR_YELLOW='\033[0;33m' # bar: medium usage (≥50%), model, cost | |
| readonly CLR_GREEN='\033[0;32m' # bar: low usage (<50%) | |
| readonly CLR_MAGENTA='\033[0;35m' # session time | |
| readonly CLR_CYAN='\033[0;36m' # api time, git branch | |
| readonly CLR_RESET='\033[0m' # reset |
This file contains hidden or 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
| //harry huang [huanghui.huang@gmail.com] | |
| // | |
| //After reading the original post [http://jboner.github.com/2008/10/06/real-world-scala-dependency-injection-di.html, ] | |
| //the original cake pattern seems quite verbose for me, and it is quite invasive, so I spent a bit time | |
| //and come up with an improved version of cake pattern, which I call it "Auto Cake DI". It is working | |
| //well with any POST(plain old scala trait)/POSO(plain old scala object) which means that anything can be | |
| //injected without modification or introducing new traits. | |
| /*---------inject trait---------*/ | |
| trait Inject[+T] { def inject: T } |