Skip to content

Instantly share code, notes, and snippets.

View theWhiteFox's full-sized avatar
👑
Crafting Web UI Apps

Stíofán ♔ Ó Conchubhair theWhiteFox

👑
Crafting Web UI Apps
View GitHub Profile
@jacobparis
jacobparis / timing.server.ts
Created April 29, 2023 23:24
Server Timing Utilities for Remix
export type PerformanceServerTimings = Record<
string,
Array<PerformanceServerTiming>
>
/**
* Run this on the server to get a `time` function that can be used to time
* server-side operations and add them to the `Server-Timing` header.
*/
export function getServerTiming() {
@joeyklee
joeyklee / mysql-setup-mac-with-sequel-pro.md
Last active November 17, 2023 05:27
Setting up mysql on mac with sequel pro and homebrew

Setup instructions

Setting up mysql on mac with sequel pro and homebrew

MacOS high sierra 10.13.6
Homebrew version 1.7.6

Assuming you've installed homebrew...

@mrmartineau
mrmartineau / stimulus.md
Last active April 9, 2025 15:37
Stimulus cheatsheet
@MoeweX
MoeweX / dijkstra.js
Last active July 25, 2022 20:50 — forked from stella-yc/dijkstra.js
Dijkstra's Algorithm in Javascript using a Weighted Graph
// Changes to original version
// 1. Calculate the distance between any nodes in the dataset, without needing to edit the problem dictionary.
// 2. Prevent algorithm from going back to start node if loops exist in graph (e.g., in problem below)
const problem = {
start: {A: 5, B: 2},
A: {start: 1, C: 4, D: 2},
B: {A: 8, D: 7},
C: {D: 6, finish: 3},
D: {finish: 1},
@serenaf
serenaf / creating_item_model
Created November 7, 2017 10:07
creating item model
ember g model item title:string points:number time:unix-date timeAgo:string url:string domain:string
@serenaf
serenaf / overview.md
Last active November 7, 2017 19:54
Ember Beginner Workshop
@matthewzring
matthewzring / markdown-text-101.md
Last active April 19, 2025 22:58
A guide to Markdown on Discord.

Markdown Text 101

Want to inject some flavor into your everyday text chat? You're in luck! Discord uses Markdown, a simple plain text formatting system that'll help you make your sentences stand out. Here's how to do it! Just add a few characters before & after your desired text to change your text! I'll show you some examples...

What this guide covers:

@stella-yc
stella-yc / dijkstra.js
Last active August 24, 2023 20:46
Dijkstra's Algorithm in Javascript using a weighted graph
const problem = {
start: {A: 5, B: 2},
A: {C: 4, D: 2},
B: {A: 8, D: 7},
C: {D: 6, finish: 3},
D: {finish: 1},
finish: {}
};
const lowestCostNode = (costs, processed) => {
@Andrew-Reid
Andrew-Reid / index.html
Last active July 14, 2017 22:58
D3v4 Force Layout with Covex Hull
<!DOCTYPE html>
<meta charset="utf-8">
<style>
.links line {
stroke: #999;
stroke-opacity: 0.6;
}
.nodes circle {
const ACTIVITIES = [
{name: 'side-project', time: 10, xp: 12},
{name: 'algorithms', time: 3, xp: 7},
{name: 'networking', time: 1, xp: 0.5},
{name: 'exercise', time: 2, xp: 1.5},
{name: 'systems design', time: 4, xp: 4},
{name: 'making CSS codepens', time: 3, xp: 4}
];
/**