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
@theWhiteFox
theWhiteFox / animated-signing-of-signature
Last active March 20, 2022 11:40
Animated signature
Animated signing of signature (SVG paths)
-----------------------------------------
animate writing a signature with SVG stroke-dashoffset/stroke-dasharray and CSS transitions
A [Pen](https://codepen.io/ghepting/pen/xnezB) by [Gary Hepting](http://codepen.io/ghepting) on [CodePen](http://codepen.io/).
[License](https://codepen.io/ghepting/pen/xnezB/license).
@theWhiteFox
theWhiteFox / index.pug
Created July 24, 2017 10:04
Slashed CSS Effect
.slashed
.top(title='Slashed')
.bot(title='Slashed')
@theWhiteFox
theWhiteFox / index.html
Created July 24, 2017 10:04
SVG Glitch
<svg version="1.1" id="Ebene_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
width="600px" height="100px" viewBox="0 0 600 100">
<style type="text/css">
<![CDATA[
text {
filter: url(#filter);
fill: white;
font-family: 'Share Tech Mono', sans-serif;
@theWhiteFox
theWhiteFox / elastic stroke
Last active March 20, 2022 11:28
Elastic stroke CSS + SVG
Elastic stroke CSS + SVG
------------------------
A [Pen](https://codepen.io/yoksel/pen/XJbzrO) by [yoksel](http://codepen.io/yoksel) on [CodePen](http://codepen.io/).
[License](https://codepen.io/yoksel/pen/XJbzrO/license).
// shorter recursive starts at 1
function fibRecursive(n) {
if(n <= 1) return 1;
return fibRecursive(n - 2) + fibRecursive(n - 1);
}
// recursive starts at 0
function fib(number) {
if(number == 0) return 0;
if(number == 1) return 1;
return fib(number - 2) + fib(number - 1);
}
// enter a number
function fibonacci(num) {
var a = 1, b = 0, temp2;
while(num > 0) {
temp2 = a;
a = a + b;
b = temp2;
num--;
console.log(temp2);
// recursive. output starts at 0
function fib(number) {
if(number == 0) return 0;
if(number == 1) return 1;
return fib(number - 2) + fib(number - 1);
}
// shorter recursive. output starts at 1
function fibRecursive(n) {
if(n <= 1) return 1;
// for loop
function fibFor() {
var a = 0, b = 1, i = 1, result;
result = b;
console.log(a + '\n' + result + '\n');
for(i; i < 10; i++) {
console.log(result + '\n');
result = a + b;
a = b;
b = result;