Skip to content

Instantly share code, notes, and snippets.

View httpJunkie's full-sized avatar
🏠
Working from home

Eric Bishard httpJunkie

🏠
Working from home
View GitHub Profile
@httpJunkie
httpJunkie / AngularNestedFormsCodeUpdate.md
Last active October 13, 2018 08:12
Angular Nested Forms Code Samples

data = { cities: [ { city: "", addressLines: [ { addressLine: "" } ] } ] }

@httpJunkie
httpJunkie / KSD_GridContainer_v1
Last active March 11, 2019 16:57
Kendo Sales Dashboard - GridContainer v1
import React from 'react';
import { Grid, GridColumn as Column } from '@progress/kendo-react-grid';
import { gridData } from '../data/appData';
export const GridContainer = () => (
<div>
<Grid style={{ height: '300px' }} data={gridData}>
<Column field="ProductID" title="ID" width="40px" />
<Column field="ProductName" title="Name" width="160px" />
@httpJunkie
httpJunkie / KSD_PanelBarData_v1
Last active October 17, 2018 21:13
Kendo Sales Dashboard - PanelBar Data v1
export const panelBarData = {
'teammates': [
{
firstName: 'Andrew',
lastName: 'Fuller',
position: 'Team Lead'
}, {
firstName: 'Nancy',
lastName: 'Leaver',
position: 'Sales Associate'
@httpJunkie
httpJunkie / KSD_BarChartContainer_v1
Last active October 18, 2018 20:11
Kendo Sales Dashboard - First Update to BarChartContainer.js
import React from 'react';
import 'hammerjs';
import {
Chart,
ChartSeries,
ChartSeriesItem,
ChartCategoryAxis,
ChartCategoryAxisItem,
ChartLegend,
@httpJunkie
httpJunkie / KSD_DonutChartContainer_v2
Last active October 18, 2018 20:12
Kendo Sales Dashboard - Second Update to App.js
import React from 'react';
import 'hammerjs';
import {
Chart,
ChartLegend,
ChartSeries,
ChartSeriesItem,
ChartSeriesLabels
} from '@progress/kendo-react-charts';
@httpJunkie
httpJunkie / KSD_DonutChartContainer_v1
Last active October 18, 2018 20:12
Kendo Sales Dashboard - First Update to App.css
import React from 'react';
import 'hammerjs';
import {
Chart,
ChartLegend,
ChartSeries,
ChartSeriesItem,
ChartSeriesLabels
} from '@progress/kendo-react-charts';
@httpJunkie
httpJunkie / KSD_AppCss_v1
Last active October 9, 2018 18:36
Kendo Sales Dashboard - First Update to App.css
h1 {
color:rgb(63, 81, 181);
font-weight: bold;
}
.buttons-right>button {
float: right;
margin: 5px;
}
.app-container {
padding: 25px;
@httpJunkie
httpJunkie / KSD_AppJs_v1
Last active March 12, 2019 07:52
Kendo Sales Dashboard - First Update to App.js
import React, { Component } from 'react';
import './App.css';
class App extends Component {
render() {
return (
<div className="bootstrap-wrapper">
<div className="app-container container">
<div className="row">
<div className="col-xs-6 col-sm-6 col-md-6 col-lg-6 col-xl-6">
@httpJunkie
httpJunkie / stateCopy.js
Created September 16, 2018 23:40
JavaScript create deep copy of object.
let state = {
name: 'Eric',
role: 'employee'
}
console.log(state);
// does not mutate state, creates copy with change to role
let newState =
Object.assign({}, state, {role: 'manager'})
@httpJunkie
httpJunkie / getHighCard.js
Created September 10, 2018 03:56
GetHighCard_Functional
const getHighCard = function (cards) {
return cards.reduce((item, next) => item.numValue > next.numValue ? item : next);
};