Category: Coding
-
Angular2: `ChangeDetectorRef` is not injectable on Tests
ChangeDetectorRef cannot be injected on test bed! You’ll need to directly spy on them. References:
-
Building Rust in Docker: Utilize Build Cache Properly!
From lucretiel‘s Tweet, which lead to one of his project’s Dockerfile… When building Rust in Docker, to cache the build, we can just add empty main.rs file, then run cargo build to build the dependencies first. Because the layer is cached, the built dependencies also cached too! After that, we can just import the rest…
-
GitLab CI: Use `!reference` to Extend Rules
In The Same File We can extend GitLab rules section with !reference [.hiddenjobname, section name]. Here’s an example: Reasons: Resources: In Template File (via include: keyword) Have not yet tried x.x TODO: Try to do this.
-
Notes on Rust’s Borrowing Situations
This is my own notes from the original video by Gary Explains. My personal notes for my self: Things to ask/revisit again: Another thing Personal comments: OMG this particular video so great! He mentions what makes it different from other languages, making it easier to notice “Oh, bener juga yak”. (Min. 9:56) This one is…
-
CSS’s `transform-style: preserve-3d` will not work with `overflow: hidden`
Just as the title says. Reference: https://stackoverflow.com/a/15704858/4721245.
-
Documenting CronJob in Function Comment
When defining cronjob, please mention following details: Please apply either @cronjob or @api phpdoc tag (especially if the cronjob is trigger-able via HTTP). Here’s a sample for that: An additional notes: There are proposed new PHP Standard for PHP Docs tags: PSR5.