Skip to content

Instantly share code, notes, and snippets.

👷‍♂️
building

# John K. Speck speckworks

👷‍♂️
building
Created June 30, 2021 23:24
loading shimmer (Facebook Loading Shimmer)
This file contains 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

ham de doo dee
whut comment
whut box
Created June 30, 2021 23:24
loading shimmer (Facebook Loading Shimmer)
This file contains 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

ham de doo dee
whut comment
whut box
Created June 17, 2020 20:06
This file contains 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
 let your_drink = "coffee"; const reverse = (s) => { return s.split("").reverse().join(""); } const barista = { str1: "ion", str2: reverse("rcne"), str3: "ypt",
Created June 17, 2020 13:57
This file contains 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
 //This is a recursive Algorithm for generating the Fibonacci series. It will require O(n^2), because it calls itself and has to allocate space for a new Array until it reaches the "break point", which here is "number === 1". const fibonacciSeq = (number) => { if(number === 1) { return [0,1]; } else { let fib = fibonacciSeq(number - 1); fib.push(fib[fib.length - 1] + fib[fib.length - 2]);
Last active June 17, 2020 13:19
This file contains 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
 //This algorithm is O(n) because as it creates a new Array taking up //(1/2 * n) amount of memory as n becomes arbitrarily large. const onlyElementsAtEvenIndices = (array) => { let newArray = Array(Math.ceil(array.length / 2 )); for (let i = 0; i < array.length; i++) { if (i % 2 === 0) { newArray[i / 2] = array [i] } } return newArray;
Last active June 17, 2020 13:04
This file contains 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
 //In this Algorithm there is only on variable "i" declared and it contains a number. //Even though that number can increase to an arbitrarily large value (according to input n), //Space Complexity is constant since it's just 1 value that is changing. const logUpToN(n) => { for(let i = 1; i <= n; i++){ console.log(i) } }
Created April 11, 2020 16:36
Zebra Sphere
This file contains 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

Created April 1, 2020 01:44
DrawSVGPlugin (All SVG Shape Types)

## DrawSVGPlugin (All SVG Shape Types)

Shows how GreenSock's DrawSVGPlugin can animate the strokes on , , , and . It can also do and . Learn more at www.greensock.com/drawSVG

A Pen by GreenSock on CodePen.

Created March 27, 2020 16:50
Specialization of Components in ReactJS.
This file contains 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

Last active March 22, 2020 01:53
Animation with CSS3