This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Below are some examples of what I love about Ruby | |
# Code that reads like English | |
10.times { print 'Hello' } | |
this_variable_is_true = true | |
print 'Something' if this_variable_is_true | |
# Metaprogramming | |
class Integer |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Below are the type definitions | |
* I used to store the data that | |
* makes up these skill pages! | |
*/ | |
export type SkillStats = { | |
years: number | string; | |
used: string; | |
likes: string; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Below are some examples of the kind of Javascript I like to write | |
* (Please note, these are contrived examples that might be silly in real life) | |
*/ | |
// Big Arrow Notation | |
const addNumbers = (num1, num2) => num1 + num2; | |
// Object Destructuring and String Interpolation | |
const anyOrderArgs = ({ title = 'Title', body = 'Body' }) => |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const MAX_WIDTH = process.env.PHOTO_MAX_WIDTH || 800; | |
const QUALITY = process.env.PHOTO_QUALITY || 0.9; | |
const readPhoto = async (photo) => { | |
const canvas = document.createElement('canvas'); | |
const img = document.createElement('img'); | |
// create img element from File object | |
img.src = await new Promise((resolve) => { | |
const reader = new FileReader(); |