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
| # open as Admin ...\etc\hosts and add container names to address resolution: | |
| 104.248.166.249 mongodb-primary mongodb-secondary mongodb-arbiter |
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
| # Stop the container(s) using the following command: | |
| docker-compose down | |
| # Delete all containers using the following command: | |
| docker rm -f $(docker ps -a -q) | |
| # Delete all volumes using the following command: | |
| docker volume rm $(docker volume ls -q) | |
| # Restart the containers using the following command: |
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
| sudo yarn install --ignore-engines |
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
| #!/bin/bash | |
| for i in `seq 0 99`; do | |
| echo " === === === " | |
| RUST_DATE=`date -u -d "-$i days" "+%Y-%m-%d"` | |
| echo "Checking $RUST_DATE..." | |
| TOML=`curl -sf https://static.rust-lang.org/dist/$RUST_DATE/channel-rust-nightly.toml` | |
| if [[ $? -gt 0 ]]; then | |
| echo "Rust $RUST_DATE does not exist" | |
| else |
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
| import { AfterViewInit, Directive, ElementRef, HostListener } from '@angular/core'; | |
| import { NgControl } from '@angular/forms'; | |
| @Directive({ | |
| selector: '[tnaDecimalMask]' | |
| }) | |
| export class DecimalMaskDirective implements AfterViewInit{ | |
| constructor(private el: ElementRef, public model: NgControl) {} | |
| @HostListener('input', ['$event']) |
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
| { | |
| "version": "0.2.0", | |
| "configurations": [ | |
| { | |
| "name": "Debug CRA Tests", | |
| "type": "node", | |
| "request": "launch", | |
| "runtimeExecutable": "${workspaceRoot}/node_modules/.bin/react-scripts", | |
| "args": ["test", "--runInBand", "--no-cache", "--watchAll=false"], | |
| "cwd": "${workspaceRoot}", |
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
| ... | |
| myForm: FormGroup; | |
| formattedMessage: string; | |
| constructor(private formBuilder: FormBuilder) {} | |
| ngOnInit() { | |
| this.myForm = this.formBuilder.group({ | |
| name: '', |
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
| ### From https://www.youtube.com/watch?v=qm0IfG1GyZU&t=682s | |
| #1 Pirfect centering: <place-items: center> | |
| <div class="bg-primary parent"> | |
| <div class="bg-success box"> | |
| :) | |
| </div> | |
| </div> |
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
| { | |
| "name": "Launch TS Program", | |
| "type": "node2", | |
| "request": "launch", | |
| "program": "${workspaceFolder}/Coins.ts", | |
| "preLaunchTask": "tsc: build - tsconfig.json", | |
| "cwd": "${workspaceRoot}", | |
| "sourceMaps": true, | |
| "env": { | |
| "NODE_ENV": "development" |
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
| # Creating the stash as a patch | |
| $ git stash list | |
| $ git stash show "stash@{0}" -p > changes.patch | |
| # Applying the patch | |
| $ git apply changes.patch | |
| # Reversing the stash (if it is not needed anymore) |
NewerOlder