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.
// ~/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... | |
##################### | |
# Default VM Options | |
##################### | |
# default value is 128m | |
-Xms1024m | |
# default value is 750m | |
-Xmx4096m | |
# default value is 512m |
-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 <[email protected]> | |
# | |
# 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
// This gist is now maintained on github at https://github.com/luetkemj/wp-query-ref | |
<?php | |
/** | |
* WordPress Query Comprehensive Reference | |
* Compiled by luetkemj - luetkemj.github.io | |
* | |
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query#Parameters | |
* Source: https://core.trac.wordpress.org/browser/tags/4.9.4/src/wp-includes/query.php | |
*/ |