If you have to extend an existing object with additional property, always prefer Vue.set() over Object.assign() (or spread operator).
Example below explains implications for different implementations.
| services: | |
| postgres17: | |
| image: 'public.ecr.aws/docker/library/postgres:17-alpine' | |
| container_name: postgres-17 | |
| restart: unless-stopped | |
| ports: | |
| - "${FORWARD_PGSQL_PORT:-5432}:5432" | |
| volumes: | |
| - pg-17-data:/var/lib/postgresql/data | |
| healthcheck: |
| type State = { | |
| added: boolean; | |
| interval: false | ReturnType<typeof setInterval>; | |
| inFrame: boolean; | |
| callbacks: Array<SetFocusedCallback>; | |
| }; | |
| type EnrichedHTMLIFrameElement = HTMLIFrameElement & { ___onWindowFocusHandled: boolean }; | |
| type SetFocusedCallback = (focused?: boolean) => void; |
| /* requires AWS creds to be updated. | |
| * if they aren't, update using AWS.config.update() method before instatiing the client. | |
| * | |
| * import this module where you instantiate the client, and simply pass this module as the connection class. | |
| * | |
| * eg: | |
| * const client = new Client({ | |
| * node, | |
| * Connection: AwsConnector | |
| * }); |
| const path = require('path') | |
| module.exports = { | |
| chainWebpack: config => { | |
| const types = ['vue-modules', 'vue', 'normal-modules', 'normal'] | |
| types.forEach(type => addStyleResource(config.module.rule('stylus').oneOf(type))) | |
| }, | |
| } | |
| function addStyleResource (rule) { |
| 172.31.43.189 - - [13/Jan/2018:03:01:56 +0000] "GET / HTTP/1.1" 404 139 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36" "191.37.20.2" | |
| 172.31.43.189 - - [13/Jan/2018:03:02:03 +0000] "GET / HTTP/1.1" 404 139 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36 OPR/50.0.2762.58" "191.37.20.2" | |
| 172.31.20.92 - - [13/Jan/2018:03:07:10 +0000] "GET /.well-known/acme-challenge/<my-key-here> HTTP/1.1" 301 185 "-" "Mozilla/5.0 (compatible; Let's Encrypt validation server; +https://www.letsencrypt.org)" "52.29.173.72" | |
| 172.31.20.92 - - [13/Jan/2018:03:07:10 +0000] "GET /.well-known/acme-challenge/<my-key-here> HTTP/1.1" 301 185 "-" "Mozilla/5.0 (compatible; Let's Encrypt validation server; +https://www.letsencrypt.org)" "34.213.106.112" | |
| 172.31.43.189 - - [13/Jan/2018:03:07:10 +0000] "GET /.well-known/acme-challenge/<my-key-here> HTTP/1.1" 301 185 "-" "Mozilla/5.0 (compatible; Let's Encrypt validation se |
| ## Problem | |
| When login in, the shell prints: | |
| ``` | |
| manpath: can't set the locale; make sure $LC_* and $LANG are correct | |
| ``` | |
| ## Solution | |
| ``` | |
| sudo locale-gen "en_US.UTF-8" | |
| sudo dpkg-reconfigure locales |
| ## 安裝語系檔 | |
| `$ sudo locale-gen "en_US.UTF-8"` | |
| ## 重新設定語系檔 | |
| `$ sudo dpkg-reconfigure locales` | |
| ## 設定檔 |