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.
| $origNvm = Get-Command nvm -CommandType Application -ErrorAction SilentlyContinue | |
| if ($origNvm) { Set-Alias nvm_external $origNvm.Path } | |
| function nvmFunc { | |
| param( | |
| [string]$Argument, | |
| [string]$Version = "" | |
| ) |
| // ~/server/api/sse.ts | |
| export default defineEventHandler(async (event) => { | |
| if (!process.dev) return { disabled: true } | |
| // Enable SSE endpoint | |
| setHeader(event, 'cache-control', 'no-cache') | |
| setHeader(event, 'connection', 'keep-alive') | |
| setHeader(event, 'content-type', 'text/event-stream') | |
| setResponseStatus(event, 200) |
| # Make sure to modify "-Xms", "Xmx", "CICompilerCount", and "ParallelGCThreads" according to your PC hardware configuration... | |
| # ------------------------------------------- | |
| # Memory Settings (High-Memory Workstation) | |
| # ------------------------------------------- | |
| # Set the initial heap size (this reduces resizing overhead) | |
| -Xms2048m | |
| # Set the maximum heap size (adjust depending on your system; 2048m or 4096m is good for modern machines) |
| -Xms1024m | |
| -Xmx3072m | |
| -Xss64m | |
| -XX:ReservedCodeCacheSize=512m | |
| -XX:+UseCompressedOops | |
| -XX:NewRatio=2 | |
| -Dfile.encoding=UTF-8 | |
| -XX:+UseConcMarkSweepGC | |
| -XX:SoftRefLRUPolicyMSPerMB=250 | |
| -XX:NewSize=512m |
| # custom IntelliJ IDEA properties | |
| editor.zero.latency.typing=true | |
| idea.max.intellisense.filesize=3500 | |
| idea.cycle.buffer.size=2048 |
| <div id="dropzone" effectAllowed="move">Drop files here!</div> | |
| <ul id="items"></ul> |
| # | |
| # Ubuntu 18.04 (Bionic Beaver) | |
| # | |
| # Basic packages i usually install. | |
| # | |
| # Author: Julius Beckmann <github@h4cc.de> | |
| # | |
| # Upgraded Script from 17.04: https://gist.github.com/h4cc/09b7fe843bb737c8039ac62d831f244e | |
| # Upgraded Script from 16.04: https://gist.github.com/h4cc/fe48ed9d85bfff3008704919062f5c9b |
| ## | |
| ## How to install mcrypt in php7.2 / php7.3 | |
| ## Linux / MacOS / OSX | |
| ## | |
| ## https://lukasmestan.com/install-mcrypt-extension-in-php7-2/ | |
| # |
$ uname -r