Skip to content

Instantly share code, notes, and snippets.

View karatechops's full-sized avatar
🐙

Alex Mejias karatechops

🐙
View GitHub Profile
@karatechops
karatechops / iss-backup-solution.js
Created April 8, 2019 15:51
Mock solution for Hack Shack Challenge
import express from 'express';
import chalk from 'chalk';
import issApi from '@hpe/hpe-issApi-js';
import dotEnv from 'dotenv';
// Instantiate our express application.
const app = express();
// Gather our environment variables.
dotEnv.config();
@font-face{font-family:Work Sans;font-style:normal;font-weight:300;src:local("Work Sans Light"),local("WorkSans-Light"),url(https://fonts.gstatic.com/s/worksans/v2/FD_Udbezj8EHXbdsqLUplxampu5_7CjHW5spxoeN3Vs.woff2) format("woff2")}@font-face{font-family:Work Sans;font-style:normal;font-weight:400;src:local("Work Sans"),local("WorkSans-Regular"),url(https://fonts.gstatic.com/s/worksans/v2/ElUAY9q6T0Ayx4zWzW63VJBw1xU1rKptJj_0jans920.woff2) format("woff2")}@font-face{font-family:Work Sans;font-style:normal;font-weight:500;src:local("Work Sans Medium"),local("WorkSans-Medium"),url(https://fonts.gstatic.com/s/worksans/v2/Nbre-U_bp6Xktt8cpgwaJBampu5_7CjHW5spxoeN3Vs.woff2) format("woff2")}@font-face{font-family:Work Sans;font-style:normal;font-weight:600;src:local("Work Sans SemiBold"),local("WorkSans-SemiBold"),url(https://fonts.gstatic.com/s/worksans/v2/z9rX03Xuz9ZNHTMg1_ghGRampu5_7CjHW5spxoeN3Vs.woff2) format("woff2")}@font-face{font-family:Work Sans;font-style:normal;font-weight:700;src:local("Work Sans Bold"),l
This file has been truncated, but you can view the full file.
var Grommet=function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";var r={Accordion:n(263),AccordionPanel:n(264),Anchor:n(26),Animate:n(265),App:n(266),Article:n(267),Box:n(8),Button:n(10),Card:n(268),Carousel:n(269),chart:{Area:n(81),Axis:n(82),Bar:n(83),Base:n(84),Chart:n(304),Grid:n(85),HotSpots:n(86),Layers:n(87),Line:n(88),Marker:n(89),MarkerLabel:n(90),Range:n(91)},CheckBox:n(37),Columns:n(271),DateTime:n(272),Distribution:n(274),Footer:n(67),Form:n(38),FormattedMessage:n(27),FormField:n(39),FormFields:n(275),Grommet:n(276),Header:n(40),Heading:n(18),Headline:n(68),Hero:n(277),Image:n(41),Label:n(42),Layer:n(43),Legend:n(278),List:n(44),ListItem:n(45),LoginForm:n(279),Map:n(280),Markdown:n(281),Menu:n(69),Meter:n(46),Notification:n(282),NumberInput:n(283),Object:n(284),Paragraph:n(23),PasswordInput:n(285),Quote:n(286),RadioButton:n(7
{
"swagger": "2.0",
"info": {
"title": "HPE OneView Global Dashboard REST API",
"version": "2",
"description": "Product version 1.70.00"
},
"tags": [
{
"name": "Appliances",
import React, {Component} from 'react'
import Box from '../node_modules/grommet/components/Box'
import Button from '../node_modules/grommet/components/Button'
import DonutChart from '../node_modules/react-d3-donut'
class CustomButton extends Component {
constructor(props) {
super(props)
this.state = {
{
"swagger": "2.0",
"info": {
"description": "This API enables the programmatic management of key components of an HPE SimpliVity configuration.\n\nTo access the API, request an authentication token by issuing an authentication request in the following form, where the username/password combination is a set of valid management credentials for the applicable hypervisor environment:\n\n curl -k https://simplivity@<host>/api/oauth/token -d grant_type=password -d username=<user> -d password=<pass>\n\nThen, you can pass in the resulting access_token returned in each HTTP header using Authorization: Bearer token. For example:\n\n curl -H \"Authorization: Bearer 0a08c809-17ff-479f-b0a8-aedd4d8305a0\"\n\nThe access_token times out after 10 minutes of inactivity and expires after 24 hours.\n\nMake sure to use TLS version 1.1 or greater.\n",
"version": "1.10",
"title": "HPE OmniStack REST API",
"contact": {
"name": "Hewlett Packard Enterprise"
},
"license": {
@karatechops
karatechops / forever-start-babel.sh
Created February 6, 2019 15:01
Forever start with babel
forever start -c "node -r babel-register" ./src/index.js
@karatechops
karatechops / aws-header-cleanup.sh
Created November 13, 2018 13:59
Monthly header clean up
#!/bin/sh
apt-get autoremove -y
@karatechops
karatechops / nvm-install.sh
Created November 7, 2018 14:53
Node install script
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash &&
command -v nvm
@karatechops
karatechops / docker-install.sh
Last active November 12, 2018 20:13
Install Docker and Docker Compose on Ubuntu Linux
# docker ce install
apt-get update &&
apt-get install \
apt-transport-https \
ca-certificates \
curl \
software-properties-common &&
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - &&
apt-key fingerprint 0EBFCD88 &&
add-apt-repository \