This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
me { | |
firstName | |
lastName | |
location { | |
city | |
state | |
} | |
avatar { | |
large | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
interface Avatar { | |
thumbnail: string; | |
large: string; | |
} | |
interface User { | |
id: number; | |
firstName: string; | |
lastName: string; | |
avatar: Avatar; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"id": 12345, | |
"firstName": "Bryan", | |
"lastName": "Irace", | |
"avatar": { | |
"thumbnail": "https://some/s3/url/a39d39fk", | |
"large": "https://some/s3/url/39fka39d" | |
}, | |
"profession": "Software developer", | |
"location": { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rgb.forEach((color, i) => { | |
var slider = d3 | |
.sliderBottom() | |
.min(0) | |
.max(255) | |
.step(1) | |
.width(300) | |
.ticks(0) | |
.default(rgb[i]) | |
.displayValue(false) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var gColorPicker = d3 | |
.select('div#slider-color-picker') | |
.append('svg') | |
.attr('width', 375) | |
.attr('height', 200) | |
.append('g') | |
.attr('transform', 'translate(30,30)'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var num2hex = rgb => { | |
return rgb | |
.map(color => { | |
let str = color.toString(16); | |
if (str.length === 1) { | |
str = '0' + str; | |
} | |
return str; | |
}) | |
.join(''); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var blob = document.getElementById('blob'); | |
var colorSlider = document.getElementById('slider-color-picker'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<head> | |
<meta http-equiv="content-type" content="text/html; charset=UTF-8"> | |
<meta charset="utf-8"> | |
<title>Slider Test</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<link rel="stylesheet" href="css/main.css"> | |
</head> | |
<body> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This is the index.js file for my Parse Live Query Server, running on a separate EC2 instance | |
var express = require('express'); | |
var cors = require('cors') | |
var ParseServer = require('parse-server').ParseServer; | |
var app = express(); | |
app.use(cors()); | |
// We include the lines below so that we can hit `/` and it passes the Elastic Beanstalk Health Check |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This is the index.js file for my main app | |
var express = require('express'); | |
var cors = require('cors') | |
var ParseServer = require('parse-server').ParseServer; | |
var path = require('path'); | |
var bodyParser = require('body-parser'); | |
var databaseUri = process.env.DATABASE_URI || process.env.MONGODB_URI; |