Skip to content

Instantly share code, notes, and snippets.

View Golodhros's full-sized avatar

Marcos Iglesias Golodhros

View GitHub Profile
@Golodhros
Golodhros / README.md
Last active August 29, 2015 14:15 — forked from milroc/README.md
My First Block

Golodhros' first block!

@Golodhros
Golodhros / README.md
Last active November 29, 2015 19:37 — forked from mbostock/.block
TDD Bar Chart

This chart takes as a base the simple bar chart by Mike Bostock and refactors that example using the reusable API, making it responsive and configurable.

It also uses the Data Manager API from the Developing a D3.js Edge Book.

It includes tests and was conceived on a TDD basis for the talk Better D3 Charts with the Reusable API.

From the original Block:

This simple bar chart is constructed from a TSV file storing the frequency of letters in the English language. The chart employs conventional margins and a number of D3 features:

@Golodhros
Golodhros / README.md
Last active May 17, 2016 15:43
TDD D3 Template

Gist to serve as template for future TDD D3 blocks

@Golodhros
Golodhros / javascriptTestObjectBuilder.js
Last active December 30, 2021 18:03
JavaScript Object Builder
/**
* @summary Generates a testObjectBuilder example object
* @requires underscore, requirejs/commonjs
*/
var testObjectBuilder = function(require) {
'use strict';
var _ = require('underscore'),
OrderModel = require('./order_model');
<?php
namespace Roots\Sage\LazyStyles;
use Roots\Sage\Assets;
/**
* Load theme scripts in the footer
* Ref: http://gomakethings.com/inlining-critical-css-for-better-web-performance/
*/
function load_theme_files() {
gulp.task('critical', function() {
var request = require('request');
var path = require( 'path' );
var criticalcss = require("criticalcss");
var fs = require('fs');
var tmpDir = require('os').tmpdir();
var cssUrl = 'http://PROJECT.dev/app/themes/sage/dist/styles/main-3c29b398.css';
var cssPath = path.join( tmpDir, 'style.css' );
var includePath = path.join( 'dist/styles/', 'critical.css' );
@Golodhros
Golodhros / .block
Last active September 8, 2016 05:30
TDD Bushing Demo
license: mit
@Golodhros
Golodhros / .block
Last active August 1, 2017 22:35
Britecharts Heatmap MVP
license: mit
@Golodhros
Golodhros / .block
Last active August 10, 2018 16:13
Bar Chart in D3 v5
license: gpl-3.0
@Golodhros
Golodhros / .block
Last active January 2, 2019 11:22
Bar Chart
license: gpl-3.0