Skip to content

Instantly share code, notes, and snippets.

View tylerbarker's full-sized avatar

Tyler Barker tylerbarker

View GitHub Profile
@tylerbarker
tylerbarker / HookAnimatedSparkles.js
Last active May 20, 2025 11:58
Phoenix LiveView - Animated Sparkles JS Hook
/**
Phoenix LiveView - Animated Sparkles JS Hook
Ported from this excellent React tutorial:
https://www.joshwcomeau.com/react/animated-sparkles-in-react
SETUP:
Add to your tailwind.config.js theme.extend.animation:
"sparkle-spin": "sparkle-spin 600ms linear forwards",
@tylerbarker
tylerbarker / thread.md
Created April 13, 2020 12:26
What is a Thread?

What is a Thread?

A thread is a program execution context which executes instructions sequentially. Multiple threads can exist within a process, and thus are able to share memory - facilitating easy communication between them.

@tylerbarker
tylerbarker / process.md
Created April 13, 2020 12:23
What is a Process?

What is a Process?

Processes are the mechanisms through which we can run multiple programs at a time. It is easy to confuse programs with processes, so to be clear: A program is a set of machine-language instructions which are stored in a file. When this program is run, it is encapsulated within a process. In this way, a process is a program in action. Every process is allocated it’s own chunk of memory. They exist in address spaces separate to one another in order to easily keep track of the state of each process and its resources.