Skip to content

Instantly share code, notes, and snippets.

View remyweb's full-sized avatar
🟩

Rémy remyweb

🟩
View GitHub Profile
@adrianjost
adrianjost / tic_tac_toe.js
Last active October 13, 2022 20:17
JS console.log() Tic-Tac-Toe Game
/*
* Created by Adrian Jost
* Feel free to use, but please credit me
*
* Start the game by calling `ttt()`
*/
function drawBoard(round, board){
console.group(`Score after round ${round}`);
console.log(" ");
console.log(' ' + (board["7"] || '7 ') + " | " + (board["8"] || ' 8 ') + " | " + (board["9"] || ' 9 '));
@zhuowei
zhuowei / index.html
Created April 24, 2014 01:18
How real programmers extract text from ePubs
<!DOCTYPE html>
<html>
<head>
<title>Convert!</title>
<script>
"use strict";
var output = "";
var index = 0;
var frame;
function frameLoad() {
@mjackson
mjackson / color-conversion-algorithms.js
Last active June 8, 2024 01:27
RGB, HSV, and HSL color conversion algorithms in JavaScript
/**
* Converts an RGB color value to HSL. Conversion formula
* adapted from http://en.wikipedia.org/wiki/HSL_color_space.
* Assumes r, g, and b are contained in the set [0, 255] and
* returns h, s, and l in the set [0, 1].
*
* @param Number r The red color value
* @param Number g The green color value
* @param Number b The blue color value
* @return Array The HSL representation