Skip to content

Instantly share code, notes, and snippets.

View theWhiteFox's full-sized avatar
👑
Crafting Web Apps - Continuous Learning

Stephen ♔ Ó Conchubhair theWhiteFox

👑
Crafting Web Apps - Continuous Learning
View GitHub Profile
let testgist = 0
npm audit
Find dependency deep in the subtrees
npm ls hoek
https://stackoverflow.com/a/50770060/5619088
npm i hoek
function reverse(string) {
return string.split('').reverse().join();
}
reverse('testing');
@theWhiteFox
theWhiteFox / Dijkstra.js
Created January 16, 2018 22:12
Dijkstra created by steTheWhiteFox - https://repl.it/@steTheWhiteFox/Dijkstra
const graph = {
start: { A: 5, B: 2 },
A: { C: 4, D: 2 },
B: { A: 8, D: 7 },
C: { D: 6, finish: 3 },
D: { finish: 1 },
finish: {},
};
console.log(graph);
@theWhiteFox
theWhiteFox / Dijkstra.js
Created January 16, 2018 21:36
Dijkstra created by steTheWhiteFox - https://repl.it/@steTheWhiteFox/Dijkstra
const graph = {
start: {A:5, B:2},
A: {C:4, D:2},
B: {A:8, D:7},
C: {D:6, finish:3},
D: {finish:1},
finish: {}
}
console.log(graph);
@theWhiteFox
theWhiteFox / FizzBuzz.js
Created January 13, 2018 14:32
FizzBuzz created by steTheWhiteFox - https://repl.it/@steTheWhiteFox/FizzBuzz
console.log(7%3);
function fizzBuzz(num) {
for (var i = 1; i <= num; i++) {
if (i % 15 === 0) console.log("FizzBuzz");
else if (i % 5 === 0) console.log("fizz");
else if (i % 3 === 0) console.log("Buzz");
else console.log(i);
}
}
@theWhiteFox
theWhiteFox / modulus operator.js
Created January 13, 2018 11:30
modulus operator created by steTheWhiteFox - https://repl.it/@steTheWhiteFox/modulus-operator
console.log(7%3);
@theWhiteFox
theWhiteFox / bootstrap tab
Last active March 20, 2022 11:30
Bootstrap tab panel
Bootstrap tab panel example
---------------------------
This works on html 5 supported browsers.
A [Pen](https://codepen.io/wizly/pen/BlKxo) by [weiss](https://codepen.io/wizly) on [CodePen](https://codepen.io).
[License](https://codepen.io/wizly/pen/BlKxo/license).
<div class="marquee">
<p>Test</p>
</div>