Skip to content

Instantly share code, notes, and snippets.

View matallo's full-sized avatar

Carlos Matallín matallo

View GitHub Profile
@matallo
matallo / _grids.scss
Last active September 24, 2016 22:30
// Grids
// --------------------------------------------------
$grid-columns: 12;
.Grid {
display: flex;
}
.Grid-inner {
display: flex;
// Components
// --------------------------------------------------
@import
'components/aside',
'components/buttons',
'components/dialogs',
'components/dropdowns',
'components/footer',
'components/grid',
/* ==========================================================================
#MAIN
========================================================================== */
/* Non-rendering scss
========================================================================== */
@import "variables";
@import "mixins";
import gulp from 'gulp';
import gulpLoadPlugins from 'gulp-load-plugins';
import browserSync from 'browser-sync';
import del from 'del';
import childProcess from 'child_process';
const $ = gulpLoadPlugins();
const reload = browserSync.reload;
gulp.task('jekyll-serve', (done) => {
SELECT *, to_char(timestamp, 'Day') as weekday, to_char(timestamp, 'HH24') as dayhour FROM matallo.feds1_copy_1
SELECT (array_agg(adshex ORDER BY timestamp ASC))[1] AS adshex
, (array_agg(agency ORDER BY timestamp ASC))[1] AS agency
, (array_agg(type ORDER BY timestamp ASC))[1] AS type
, flight_id
, ST_MakeLine(the_geom) as the_geom
, min(timestamp) AS timestamp
FROM matallo.feds1_copy_1
GROUP BY flight_id
require 'csv'
require 'typhoeus'
require 'json'
FLIGHTSTATS_URL = "https://api.flightstats.com/flex/ratings/rest/v1/json/route"
APPID = ""
APPKEY = ""
CSV.open("ratings.csv", "w") do |csv|
# csv << ratings.first.keys
var vizJSON = {
"title": "On-Time Performance Rating",
"description": "Data from <a href=\"http://www.flightstats.com/go/Home/home.do\">FlightStats</a> and <a href=\"http://openflights.org/data.html\">OpenFlights</a>",
"user": {
"fullname": "Carlos Matallín",
"avatar_url": "https://s3.amazonaws.com/com.cartodb.users-assets.production/production/matallo/assets/20150603150130matallo.jpg"
},
"updated_at": "2016-02-23T07:56:47+00:00",
"widgets": [
@matallo
matallo / index.html
Last active December 2, 2015 14:25 — forked from javisantana/index.html
torque with a custom formatter
<!DOCTYPE html>
<html>
<head>
<title>Easy example | CartoDB.js</title>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
<link rel="shortcut icon" href="http://cartodb.com/assets/favicon.ico" />
<style>
html, body, #map {
height: 100%;
http://quote.plus/?json={%22pageUrl%22:%22http://waitbutwhy.com/2015/11/the-cook-and-the-chef-musks-secret-sauce.html#1","selectionText":"I%E2%80%99m more like the gardener, and then there are the flowers. If there%E2%80%99s no garden, there%E2%80%99s no flowers. I could try to be a flower in the garden, or I could try to make sure there is a garden."}&s=request_token