Blog

Latest Articles - Page 67

Browse the latest tutorials, guides, and practical examples across Linux, DevOps, security, databases, and programming on GoLinuxCloud.

Explore the latest tutorials and guides across Linux, DevOps, programming, and more.

You can also browse content by category below:

  • Linux: Commands, administration, troubleshooting, and system operations
  • DevOps: CI/CD, Kubernetes, containers, and automation
  • Cloud: AWS, Azure, OpenStack, and hybrid cloud administration
  • Programming: Coding tutorials, scripting, and development concepts
  • Security: Ethical hacking, system security, and best practices
  • Databases: MySQL, MariaDB, PostgreSQL, and database management
  • Networking: Network setup, troubleshooting, and protocols
  • Storage: Disk management, file systems, and storage solutions
  • Tools: Useful tools and utilities for productivity

3098 articles

Blog illustration with latest articles, tutorials, guides, and how-to content across Linux and DevOps topics
programming

How to copy an array in JavaScript (shallow vs deep)

JavaScript copy array: shallow copies with spread, slice, Array.from, concat, map, and filter; deep copies with structuredClone; JSON limitations; sparse-array caveats. Snippets include short expected-output notes from …

Olorunfemi Akinlua7 min read
programming

HashSet in JavaScript (`Set`, uniqueness, Map vs dedupe)

Hashset JavaScript and js hashset: use Set for unique values like a HashSet, add/has/delete, SameValueZero and NaN, object identity, dedupe arrays with spread, Map when you need keys. Section intros explain each pattern; …

Olorunfemi Akinlua5 min read
programming

Convert string to array JavaScript (split, Array.from, Unicode)

How to convert string to array in JavaScript: string to array javascript, javascript string to array, js string to array, convert string to array javascript with split, Array.from, spread, javascript string to char …

Olorunfemi Akinlua6 min read
programming

JavaScript copy to clipboard (navigator.clipboard.writeText, secure context)

Copy text to the clipboard with navigator.clipboard.writeText, secure contexts, NotAllowedError, readText, and why execCommand is legacy. Node uses a stub clipboard in examples so snippets run; browsers need HTTPS and …

Olorunfemi Akinlua5 min read
programming

JavaScript clone object (shallow spread, structuredClone, JSON)

Clone objects in JavaScript: shallow spread and Object.assign, for...in, Object.create + descriptors, JSON limits, structuredClone and DataCloneError, and circular refs. Runnable Node snippets with short output notes; …

Olorunfemi Akinlua6 min read
programming

JavaScript classes tutorial (constructor, methods, static, extends)

JavaScript classes: constructor, instance methods, getters, static methods, extends and super, public fields, and private # fields. Runnable Node snippets with short expected-output notes; links to ranges and cloning …

Olorunfemi Akinlua6 min read
programming

jQuery check if checkbox is checked (and JavaScript checked property)

Read checkbox state with HTMLInputElement.checked, jQuery .prop('checked') and .is(':checked'), why .attr('checked') misleads, and change events. Snippets use `{run=false}`—run in DevTools or with jsdom + jQuery 3.7; …

Steve Alila5 min read
programming

JavaScript check if undefined (typeof, ===, void 0, nullish)

Check undefined in JavaScript: typeof for undeclared names, === undefined for declared bindings, falsy vs undefined, == null, void 0, and nullish coalescing (??) for defaults. Runnable Node snippets with short output …

Olorunfemi Akinlua6 min read
programming

JavaScript check if string is number (Number.isFinite, isNaN, parseInt)

Validate numeric strings in JavaScript: whole-token checks with trim + Number.isFinite, global isNaN pitfalls, parseInt prefix behavior, integers, strict regex decimals, and digits-in-text vs fully numeric. Runnable Node …

Olorunfemi Akinlua6 min read
programming

JavaScript check if string contains space or whitespace (indexOf, RegExp, trim)

Check if a string contains spaces in JavaScript: literal U+0020 vs Unicode whitespace, indexOf and includes, RegExp \s, trim for ends-only emptiness, and NBSP (U+00A0) pitfalls. Runnable Node snippets with short …

Olorunfemi Akinlua5 min read
programming

JavaScript double exclamation mark (!!): boolean coercion

JavaScript double exclamation (!!) vs Boolean(): same boolean coercion to true/false, truthy and falsy lists, TypeScript idiom, and why [] is truthy. Runnable Node snippets with short output notes.

Olorunfemi Akinlua5 min read
programming

JavaScript double question mark (??): nullish coalescing

JavaScript double question mark (??) is nullish coalescing: defaults only for null or undefined, unlike ||. Covers chaining, mixing with ||/&& (parentheses), and examples where 0 and empty string must be preserved. …

Olorunfemi Akinlua5 min read
programming

Cannot use import statement outside a module

Fix SyntaxError cannot use import statement outside a module in Node.js, browsers, and AWS Lambda. Use type module, .mjs, script type=module, and avoid ERR_MODULE_NOT_FOUND confusion—with Node-tested output.

Deepak Prasad8 min read
programming

JavaScript findIndex: array findIndex and objects by property

findIndex javascript and js findIndex: predicate scan with Array.prototype.findIndex, return index or -1, optional thisArg, javascript find index of object in array by property, and how findIndex differs from find and …

Olorunfemi Akinlua4 min read
devops

Understanding Docker Vs Containerd

Container execution is handled by containerd. You can think of it as a container supervisor that handles container lifecycle operations.

Deepak Prasad6 min read
linux

Top 5 Best Practices for Containerized Deployments

Even though containers are valuable in the current software development trends, realizing containerized deployments in organizations is not easy. This article

Deepak Prasad6 min read
cheatsheet

How to limit CPU using cgroups (v2 and v1) on Linux

How to cap CPU with Linux cgroups: cgroup v2 cpu.max and cpu.stat, cgroup v1 cfs quota files, systemd CPUQuota and CPUWeight, shared limits with systemd slices, optional CPUQuotaPeriodSec, plus how this differs from …

Deepak Prasad15 min read
linux

How to Check Memory Usage per Process in Linux

Learn how to check memory usage by process in Linux with tested ps, top, pmap, /proc, smaps_rollup, statm, free, and pidstat examples. Understand RSS, VSZ, PSS, USS, shared memory, and how to find the top …

Deepak Prasad11 min read
linux

Linux memory limits in containers (cgroups, Docker, Kubernetes)

Learn how Linux enforces memory limits inside containers using cgroups, how cgroup v1 and v2 differ, why tools disagree, and how Docker and Kubernetes map limits to the kernel.

Deepak Prasad24 min read
devops

Debugging Kubernetes Operators: kubectl, Logs, and Webhook Failures

Learn how to debug Kubernetes Operators from the outside in: manager logs and flags, kubectl describe and events, stuck Terminating resources, validating and mutating webhooks (TLS, caBundle, cert-manager), conversion …

Deepak Prasad15 min read
programming

Compare strings in JavaScript: ===, localeCompare, and case-insensitive matches

JavaScript string compare and string equals with === vs ==, localeCompare and Intl.Collator for locale-aware sorting, case-insensitive patterns, trim and Unicode normalize—with example console output.

Olorunfemi Akinlua7 min read
programming

Convert an array to a string in JavaScript (join, toString, JSON)

Convert array to string in JavaScript with join, toString, String(), toLocaleString, JSON.stringify, reduce, or loops—with example output and common pitfalls (objects, BigInt, null/undefined).

Olorunfemi Akinlua5 min read
programming

Cannot set headers after they are sent to the client (Express & Node.js)

Fix Error [ERR_HTTP_HEADERS_SENT] and cannot set headers after they are sent in Express/Node: double res.send, async races, middleware next(), error handlers, and res.headersSent—with tested client and log lines.

Steve Alila9 min read
programming

JavaScript appendChild() — add and move DOM nodes

Use Node.appendChild in JavaScript to add or move elements. Includes append vs appendChild, DocumentFragment batching, insertBefore, cloneNode, and jsdom-tested console output.

Olorunfemi Akinlua6 min read
programming

Convert SRT subtitles to plain text in JavaScript with regex

Convert srt to text or srt to txt in JavaScript: regex to remove index and timestamp lines, line-skip variant, block split for multi-line cues, Node readFileSync/writeFileSync with utf8—no npm install fs. Includes …

Olorunfemi Akinlua5 min read
programming

JavaScript date formatting with Intl.DateTimeFormat

Format dates in JavaScript with Intl.DateTimeFormat: locales, dateStyle and timeStyle, time zones, formatRange, formatToParts, and common TypeErrors. Includes tested sample output from Node.js (V8).

Olorunfemi Akinlua7 min read
programming

Parse a string to a boolean in JavaScript

Coerce strings with Boolean() and !!, or parse canonical values like 'true'/'false'. Learn the difference and avoid common mistakes.

Olorunfemi Akinlua2 min read
programming

Calling vs invoking functions in JavaScript: what actually happens to this

Call vs invoke and invoke vs call in JavaScript: both usually mean run a function. Clarify this binding, method calls vs free calls, Function.prototype.call naming, and library methods named invoke—with example console …

Olorunfemi Akinlua4 min read
programming

Detect ad blockers in JavaScript: bait DOM, heuristics, and what not to break

How to detect adblock in JavaScript: bait DOM patterns, getComputedStyle and offsetWidth checks, BlockAdBlock (blockadblock js) global guard, common API mistakes, limitations and false positives—with example branch logic …

Olorunfemi Akinlua6 min read
programming

Clear timeouts in JavaScript: clearTimeout and patterns that scale

Use clearTimeout (cleartimeout in search terms) to cancel one or many setTimeout timers. JavaScript has no built-in clear-all—track handles in a Set or array, including in Node.js. Includes Node-tested console output, …

Olorunfemi Akinlua6 min read