% | Hex |
---|---|
➤ YN0000: ┌ Resolution step | |
➤ YN0032: │ fsevents@npm:2.3.2: Implicit dependencies on node-gyp are discouraged | |
➤ YN0061: │ rollup-plugin-inject@npm:3.0.2 is deprecated: This package has been deprecated and is no longer maintained. Please use @rollup/plugin-inject. | |
➤ YN0013: │ vscode-textmate@https://github.com/octref/vscode-textmate.git#commit=e65aabe2227febd | |
➤ YN0032: │ fsevents@npm:2.1.3: Implicit dependencies on node-gyp are discouraged | |
➤ YN0061: │ fsevents@npm:2.1.3 is deprecated: "Please update to latest v2.3 or v2.2" | |
➤ YN0013: │ vscode-textmate@https://github.com/octref/vscode-textmate.git#commit=e65aabe2227febd | |
➤ YN0058: │ vscode-textmate@https://github.com/octref/vscode-textmate.git#commit=e65aabe2227febda7beaad31dd0fca1228c5ddf3: Packing the package failed (exit code 1, logs can be found here: /tmp/xfs-bda6b316/pack.log) | |
➤ YN0000: └ Completed in 2m 7s | |
➤ YN0000: Failed with errors in 2m 7s |
export default class Hooks { | |
constructor() { | |
console.log(this.styleHooks); | |
} | |
get stylesheets() { | |
return [...document.styleSheets, ...document.adoptedStyleSheets]; | |
} | |
get rules() { |
/** | |
* I wanted to create an example of a change stream that updates itself. | |
* I couldn't find any examples online that weren't a simple "console.log" in the change stream. | |
* The secret sauce is in the $update.$match. | |
* We are only watching for changes that do not update the searchKeywords (in this example). | |
* | |
* In execution this collection has a text index on "searchKeywords" and createEdgeNGrams is a standard algorithm for splitting up words. | |
* If you ran LeadModel.updateOne({_id: anyId}, {name:'Hello World'}), the on('change') will be triggered and update the searchKeywords. | |
* Since this followup update changes searchKeywords, the filter will prevent an infinite loop. | |
*/ |
import EventEmitter from 'node:events'; | |
import cluster from 'cluster'; | |
import { v4 as uuidv4 } from 'uuid'; | |
import CONFIG, { isDevelopment } from '../configuration.js'; | |
class Worker extends EventEmitter { | |
variables = {}; | |
workers = {}; |
Just a gist from a larger project. Worker.runonce is a function that will ask the primary process for permission to proceed. The primary process will track what activites are run where (through the unique key) and pass down the approved pid. If the worker's pid doesn't match what prime messages out, it will not run the callback.
The purpose of overriding watch is that having so many watch actions on the prime process was causing OOM Errors in Heroku. Model.watch().on() can be called as normal.
Demo of Async Virtuals in Monoose 6.2.7. Using no plugins, it's three steps.
-
Declare an instance method (it's
loadChildren
in the example). The instance method should store the results into a this._variable (variable name is not relevant, just be sure not to use one that's already in use). -
In
schema.post('find')
, run an Promise that fires your instance method in a loop using await Promise.all().
# Place this function in you $Env:Profile | |
# Has worked with most of what I've thrown at it. | |
# E.g. `sudo cmd.exe /C mklink /J C:\Test C:\Windows` | |
function Sudo { | |
[string] $Location = (Get-Location) | |
$NewArgs = @() | |
For ( $i = 0; $i -Lt $args.Length; $i++) { | |
$NewItem = "$($args[$i])".Replace(" ","`` ").Replace("'","``'").Replace('"','``"') |
/** | |
* Simple map of the USA. | |
* Merged from johan/world.geo.json countries\USA folder. | |
* | |
* @see https://github.com/johan/world.geo.json | |
*/ | |
const MapPolygon = { | |
type: 'FeatureCollection', | |
features: [ |
<?php | |
/** | |
* Your custom post type | |
* | |
* @package Pacakge_Name | |
*/ | |
/** | |
* Post Type. | |
*/ |