Skip to content

Instantly share code, notes, and snippets.

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

Stíofán ♔ Ó Conchubhair theWhiteFox

👑
Crafting Web UI Apps
View GitHub Profile
@chrtze
chrtze / chart.js
Created November 23, 2015 20:00
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) {
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>A simple MVC structure</title>
<link rel="stylesheet" href="css/style.css">
</head>
<body>
<div id="container">
<h1>My users</h1>
@Fresh-Dev
Fresh-Dev / glowingInputs.css
Created February 10, 2016 19:26
Glowing Inputs
input[type=text], textarea {
-webkit-transition: all 0.30s ease-in-out;
-moz-transition: all 0.30s ease-in-out;
-ms-transition: all 0.30s ease-in-out;
-o-transition: all 0.30s ease-in-out;
outline: none;
padding: 3px 0px 3px 3px;
margin: 5px 1px 3px 0px;
border: 1px solid #ddd;
}
@david-mark
david-mark / usestrict.md
Last active March 4, 2025 16:38
'use strict' Considered Pointless and Harmful

'use strict' Considered Pointless and Harmful

What is strict mode?

According to the MDN reference, it is:

ECMAScript 5's strict mode is a way to opt in to a restricted variant of JavaScript [sic].

It goes on to say:

const ACTIVITIES = [
{name: 'side-project', time: 10, xp: 12},
{name: 'algorithms', time: 3, xp: 7},
{name: 'networking', time: 1, xp: 0.5},
{name: 'exercise', time: 2, xp: 1.5},
{name: 'systems design', time: 4, xp: 4},
{name: 'making CSS codepens', time: 3, xp: 4}
];
/**
@Andrew-Reid
Andrew-Reid / index.html
Last active July 14, 2017 22:58
D3v4 Force Layout with Covex Hull
<!DOCTYPE html>
<meta charset="utf-8">
<style>
.links line {
stroke: #999;
stroke-opacity: 0.6;
}
.nodes circle {
@stella-yc
stella-yc / dijkstra.js
Last active August 24, 2023 20:46
Dijkstra's Algorithm in Javascript using a weighted graph
const problem = {
start: {A: 5, B: 2},
A: {C: 4, D: 2},
B: {A: 8, D: 7},
C: {D: 6, finish: 3},
D: {finish: 1},
finish: {}
};
const lowestCostNode = (costs, processed) => {
@matthewzring
matthewzring / markdown-text-101.md
Last active May 20, 2025 19:04
A guide to Markdown on Discord.

Markdown Text 101

Want to inject some flavor into your everyday text chat? You're in luck! Discord uses Markdown, a simple plain text formatting system that'll help you make your sentences stand out. Here's how to do it! Just add a few characters before & after your desired text to change your text! I'll show you some examples...

What this guide covers:

@serenaf
serenaf / overview.md
Last active November 7, 2017 19:54
Ember Beginner Workshop
@serenaf
serenaf / creating_item_model
Created November 7, 2017 10:07
creating item model
ember g model item title:string points:number time:unix-date timeAgo:string url:string domain:string