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
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}
];
/**
$.ajax({
type: "GET",
url: "test.xml",
dataType: "xml",
success: function (xml) {
// Changes XML to JSON
function xmlToJson(xml) {
// Create the return object
@theWhiteFox
theWhiteFox / castle-face.markdown
Last active January 17, 2017 08:51
Castle Face
Simple regex
Regex quick reference
[abc] A single character: a, b or c
[^abc] Any single character but a, b, or c
[a-z] Any single character in the range a-z
[a-zA-Z] Any single character in the range a-z or A-Z
^ Start of line
$ End of line
\A Start of string
@theWhiteFox
theWhiteFox / bootstrap-3-contact-form-with-validation.markdown
Created December 15, 2016 09:36
Bootstrap 3 Contact form with Validation

Bootstrap 3 Contact form with Validation

A contact form built with Bootstrap 3. Field validation with Bootstrap Validator.

A Pen by Jay Deutsch on CodePen.

License.

@theWhiteFox
theWhiteFox / index.html
Last active November 11, 2016 14:52
Pure CSS pie timer
<div class="wrapper">
<div class="pie spinner"></div>
<div class="pie filler"></div>
<div class="mask"></div>
</div>
@theWhiteFox
theWhiteFox / index.html
Created November 10, 2016 13:05
Sketch
<svg class="mid" xmlns="http://www.w3.org/2000/svg" version="1.1" id="Layer_1" x="0" y="0" width="677" height="427.7" viewBox="0 0 677 427.7" enable-background="new 0 0 677 427.669" xml:space="preserve">
<radialGradient id="shadow_1_" cx="3337.4" cy="53557.7" r="155.4" fx="3449.4" fy="53546.1" gradientTransform="matrix(0.773 0.6344 -0.0855 0.1042 2234.0835 -7382.4531)" gradientUnits="userSpaceOnUse">
<stop offset="0" stop-color="#231F20"/>
<stop offset="0.1" style="stop-color:#262626;stop-opacity:0.4"/>
<stop offset="0.3" style="stop-color:#555555;stop-opacity:0.3"/>
<stop offset="1" style="stop-color:#222222;stop-opacity:0"/>
</radialGradient>
<path id="shadow" fill-rule="evenodd" clip-rule="evenodd" fill="url(#shadow_1_)" d="M358.9 417.4c-7.5 9.1-68.5-28.5-136.2-84.1 -67.7-55.6-116.6-108.1-109.1-117.2 7.5-9.1 68.5 28.5 136.2 84.1C317.6 355.8 366.4 408.3 358.9 417.4z"/>
<g id="model">
<radialGradient id="lt-paths_1_" cx="7968.7" cy="-3320.7" r="1227.8" gradientTransform="matrix(-0.4
@theWhiteFox
theWhiteFox / d3-js-stacked-bar-chart.markdown
Created November 3, 2016 17:20
d3.js stacked bar chart
@theWhiteFox
theWhiteFox / colores.js
Created November 2, 2016 11:46 — forked from aaizemberg/colores.js
categorical colors
// colores usados por Google en sus graficos, trends, etc.
//
function colores_google(n) {
var colores_g = ["#3366cc", "#dc3912", "#ff9900", "#109618", "#990099", "#0099c6", "#dd4477", "#66aa00", "#b82e2e", "#316395", "#994499", "#22aa99", "#aaaa11", "#6633cc", "#e67300", "#8b0707", "#651067", "#329262", "#5574a6", "#3b3eac"];
return colores_g[n % colores_g.length];
}
//
//
var c10 = d3.scale.category10();
@theWhiteFox
theWhiteFox / index.html
Last active November 2, 2016 09:10
Stacked Bar Chart
<div class="widget">
<div class="header">Stacked Bar Chart</div>
<div id="chart" class="chart-container">
</div>
</div>