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
"use strict";
// below functions can be accessed from the console
// very basic fibonacci
function basicFib() {
var first = 1,
second = 0,
answer = first + second;
while(answer < 100) {
@theWhiteFox
theWhiteFox / fullscreen-youtube-video-background-in-pure-css.markdown
Created June 30, 2017 12:50
FullScreen YouTube Video Background In Pure CSS
@theWhiteFox
theWhiteFox / fibonacciHTML.js
Last active January 17, 2018 09:41
fibonacciWhile
// 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89
// 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89
// Fn = Fn-1 + Fn-2
// F0 = 0, F1 = 1
"use strict";
// fibonacci html output
function fibonacciHTML() {
var result = 0, term1 = 0, term2 = 1, i = 1;
@theWhiteFox
theWhiteFox / index.html
Created June 22, 2017 11:03
SUPER SIMPLE FULL PAGE PRELOADER
<div class="js"><!--this is supposed to be on the HTML element but codepen won't let me do it-->
<body>
<div id="preloader"></div>
<h1>SUPER SIMPLE FULL PAGE PRELOADER</h1>
<p>Works with modernizr, or you could just add your own js class to the html element using javascript</p>
<p>You can make it fit your site better by generating your own image here: http://ajaxload.info/ then change the background color in the css</p>
@theWhiteFox
theWhiteFox / upgradeNodeWindows
Last active May 10, 2017 14:15
Upgrade Node and NPM on Windows
Set-ExecutionPolicy Unrestricted -Scope CurrentUser -Force
npm install -g npm-windows-upgrade
npm-windows-upgrade
sudo rm -rvf /var/lib/apt/lists/*
sudo apt-get update
sudo shutdown -r now

Chart.js in bootstrap modal

Load a line chart from chart.js in a bootstrap modal. The chart data came from link attribute.

A Pen by Michael Topp on CodePen.

License.

@theWhiteFox
theWhiteFox / 3d-step-counter-card.markdown
Created May 2, 2017 14:26
3D step counter card 🚶
@theWhiteFox
theWhiteFox / index.pug
Last active March 21, 2022 09:09
Pure CSS loaders
doctype html
html
head
meta(charset="utf-8")
body
.wrapper
header.main-header
h1.page-title Single Element CSS Loaders
main.main-content
section.loader-section
@theWhiteFox
theWhiteFox / chart.js
Created May 2, 2017 10:20 — forked from chrtze/chart.js
Line Chart Example
var Chart = (function(window,d3) {
var svg, data, x, y, xAxis, yAxis, dim, chartWrapper, line, path, margin = {}, width, height, locator;
var breakPoint = 768;
d3.csv('data.csv', init); //load data, then initialize chart
//called once the data is loaded
function init(csv) {