Skip to content

Instantly share code, notes, and snippets.

@Colter-Hammer
Colter-Hammer / tower_of_hanoi.js
Created October 18, 2019 20:13
A little bit of recursion practice using the game Tower of Hanoi
function move(ring, start, end) {
console.log(`Move ring ${ring} from tower ${start} to tower ${end}`)
}
/*
* hanoi()
* @param - n = Number of rings in game
* @param - start = starting tower
* @param - end = ending tower
* @param - aux = in-between tower
@Colter-Hammer
Colter-Hammer / google-sheets-colour-preview.js
Last active September 22, 2019 17:53 — forked from kuyazee/google-sheets-colour-preview.js
A Google Sheets script which adds colour preview to cells. When you edit a cell containing a valid CSS hexadecimal colour code (like #000 or #000000), the background colour will be changed to that colour and the font colour will be changed to the inverse colour for readability.
/*
This script is meant to be used with a Google Sheets spreadsheet. When you edit a cell containing a
valid CSS hexadecimal colour code (like #000 or #000000), the background colour will be changed to
that colour and the font colour will be changed to the inverse colour for readability.
To use this script in a Google Sheets spreadsheet:
1. go to Tools » Script Editor » Spreadsheet;
2. erase everything in the text editor;
3. change the title to "Set colour preview on edit";