Skip to content

Instantly share code, notes, and snippets.

View mshuber1981's full-sized avatar
💭
Working for the man...

Michael Huber mshuber1981

💭
Working for the man...
View GitHub Profile
@Stefany93
Stefany93 / skip_link.html
Created December 12, 2019 19:05
Skip link (Bypass blocks) code
@branneman
branneman / primitive-reference-types-javascript.md
Last active April 13, 2024 05:10
Primitive Types & Reference Types in JavaScript

Primitive Types & Reference Types in JavaScript

An explanation of JavaScript's pass-by-value, which is unlike pass-by-reference from other languages.

Facts

  • JavaScript has 2 kinds of variable types: primitive and reference.
  • A fixed amount of memory is reserved after creation of every variable.
  • When a variable is copied, it's in-memory value is copied.
  • Passing a variable to a function via a call also creates a copy of that variable.

Primitive Types

@WillemRB
WillemRB / ProcessingAnimation
Last active December 15, 2023 01:28
PowerShell function to create a processing animation for long running scriptblocks.
function ProcessingAnimation($scriptBlock) {
$cursorTop = [Console]::CursorTop
try {
[Console]::CursorVisible = $false
$counter = 0
$frames = '|', '/', '-', '\'
$jobName = Start-Job -ScriptBlock $scriptBlock