Skip to content

Instantly share code, notes, and snippets.

@ocodista
ocodista / monitor_process.sh
Created December 28, 2023 20:09
Bash script to monitor process and save to .csv
#!/bin/bash
# Check for correct number of arguments
if [ "$#" -ne 2 ]; then
echo "Usage: $0 <PID> <Label>"
exit 1
fi
PID=$1
LABEL=$2
@ocodista
ocodista / no-else-please-2.js
Last active February 11, 2024 22:31
no-else-please-2.js
// Uses Node, AMD or browser globals to create a module. This example creates
// a global even when AMD is used. This is useful if you have some scripts
// that are loaded by an AMD loader, but they still want access to globals.
// If you do not need to export a global for the AMD case,
// see returnExports.js.
// If you want something that will work in other stricter CommonJS environments,
// or if you need to create a circular dependency, see commonJsStrictGlobal.js
// Defines a module "returnExportsGlobal" that depends another module called
@ocodista
ocodista / test.js
Created December 14, 2023 16:26
No else please
// Uses Node, AMD or browser globals to create a module. This example creates
// a global even when AMD is used. This is useful if you have some scripts
// that are loaded by an AMD loader, but they still want access to globals.
// If you do not need to export a global for the AMD case,
// see returnExports.js.
// If you want something that will work in other stricter CommonJS environments,
// or if you need to create a circular dependency, see commonJsStrictGlobal.js
// Defines a module "returnExportsGlobal" that depends another module called