Skip to content

Instantly share code, notes, and snippets.

View UnbrandedTech's full-sized avatar
👻

James Kenaley UnbrandedTech

👻
View GitHub Profile
'use strict'
import React, { Component } from 'react'
import PropTypes from 'prop-types'
import { Table, Menu, Icon, Segment, Input } from 'semantic-ui-react'
import capitalize from 'lodash/capitalize'
import flatten from 'lodash/flatten'
import orderBy from 'lodash/orderBy'
import debounce from 'lodash/debounce'

Combine http://aws.amazon.com/ec2/pricing/ and http://aws.amazon.com/ec2/instance-types/#selecting-instance-types into one f*cking table.

Type | Arch | vCPU | ECU | Mem | Storage | EBS-optimized | Network | Price | Per Month ------|------|------|------|-----|-----|---------|---------------|---------------------|--------|----------- General ||||||||| t1.micro | 32/64 | 1 | Variable | 0.615 | EBS only | - | Very Low | $0.020 | $14.60 m1.small | 32/64 | 1 | 1 | 1.7 | 1 x 160 | - | Low | $0.065 | $47.45 m1.medium | 32/64 | 1 | 2 | 3.75 | 1 x 410 | - | Moderate | $0.130 | $94.90 m1.large | 64 | 2 | 4 | 7.5 | 2 x 420 | Yes | Moderate | $0.260 | $189.8

<!-- https://docs.google.com/drawings/d/1kMuI0J7GTbAGifhH2CpajqT1Vb2PXKYpunVlCsk6e0c/edit?usp=sharing -->
<!DOCTYPE html>
<html>
<head>
<style type="text/css">
</style>
<script src="http://fb.me/react-0.12.2.js"></script>
<script src="http://fb.me/JSXTransformer-0.12.2.js"></script>
</head>
<body>
@UnbrandedTech
UnbrandedTech / control.js
Created November 24, 2014 23:29
Bootstrap/Angular file upload or url input with preview
$scope.removeImages = function(){
var file = document.getElementById('imagePreview');
while (file.firstChild) {
file.removeChild(file.firstChild);
}
delete $scope.icon.file;
};
$scope.setFile = function(element) {
$scope.$apply(function($scope) {