Skip to content

Instantly share code, notes, and snippets.

View edwinro's full-sized avatar

Edwin Rozie edwinro

View GitHub Profile
@DLiblik
DLiblik / areEquivalent.js
Last active October 13, 2023 14:23
Fast JS function for testing if Javascript values/objects are equivalent or equal - guards against circular references, prioritizes speed.
/**
Compares two items (values or references) for nested equivalency, meaning that
at root and at each key or index they are equivalent as follows:
- If a value type, values are either hard equal (===) or are both NaN
(different than JS where NaN !== NaN)
- If functions, they are the same function instance or have the same value
when converted to string via `toString()`
- If Date objects, both have the same getTime() or are both NaN (invalid)
- If arrays, both are same length, and all contained values areEquivalent
@aamsur-mkt
aamsur-mkt / extending-no-space-left-linux-filesystem.md
Last active March 22, 2024 15:49
[increase|raise|resize] Extending Linux Filesystem in AWS, No space left on device makes some jobs failure

Example

Use the df -h command to verify that the root partition mounted under "/" is full (100%). In the following example, /dev/nvme0n1p1 is using 100% of its space.

[ec2-user ~]$ df -h
Filesystem      Size  Used Avail Use% Mounted on
devtmpfs        460M     0  475M   0% /dev