Skip to content

Instantly share code, notes, and snippets.

About

Interpolating between things using lerp.

function lerp (start, end, t) {
  return start * (1 - t) + end * t;
}
@frankfaustino
frankfaustino / gradient.js
Created August 20, 2018 08:03
Generate Color Gradient
generateColor = (start, end, h, row) => {
const scale = row / h
const r = Math.round(
Math.min(255, Math.max(0, start.red + scale * (end.red - start.red)))
)
const g = Math.round(
Math.min(255, Math.max(0, start.green + scale * (end.green - start.green)))
)
const b = Math.round(
Math.min(255, Math.max(0, start.blue + scale * (end.blue - start.blue)))
@frankfaustino
frankfaustino / github-pr-template.md
Created November 19, 2018 05:55
GitHub Pull Request Template

Description

Please include a summary of the change and a link to which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

Fixes # (issue)

Type of change

Please delete options that are not relevant.

@frankfaustino
frankfaustino / GitCommitEmoji.md
Created December 19, 2018 05:48 — forked from parmentf/GitCommitEmoji.md
Git Commit message Emoji
@frankfaustino
frankfaustino / order.css
Created December 20, 2018 02:32
Ordering CSS Properties
/*
1. Layout Properties (position, float, clear, display)
2. Box Model Properties (width, height, margin, padding)
3. Visual Properties (color, background, border, box-shadow)
4. Typography Properties (font-size, font-family, text-align, text-transform)
5. Misc Properties (cursor, overflow, z-index)
*/
.example {
/* layout */

MySQL Cheat Sheet

Help with SQL commands to interact with a MySQL database

MySQL Locations

  • Mac /usr/local/mysql/bin
  • Windows /Program Files/MySQL/MySQL version/bin
  • Xampp /xampp/mysql/bin

Add mysql to your PATH

@frankfaustino
frankfaustino / install-arch.md
Last active September 20, 2022 19:03 — forked from mjnaderi/install-arch.md
Install Arch Linux with Full Disk Encryption (LVM on LUKS)