Skip to content

Instantly share code, notes, and snippets.

View addamh's full-sized avatar

Addam Hardy addamh

View GitHub Profile
@addamh
addamh / locations-2.csv
Created December 6, 2019 19:55
locations-2.csv
We can't make this file beautiful and searchable because it's too large.
f_lat,f_lng,product_id,in_stock
32.944164,-96.71669,963752291,false
43.1612,-78.6946,922027831,false
43.1612,-78.6946,330452396,false
43.1612,-78.6946,850864073,false
35.7109,-78.6594,922027831,false
35.7109,-78.6594,330452396,false
35.7109,-78.6594,850864073,false
29.3831,-98.396,922027831,false
29.3831,-98.396,330452396,false
@addamh
addamh / locations.csv
Created December 6, 2019 19:51
locations.csv
We can't make this file beautiful and searchable because it's too large.
f_lat,f_lng,product_id,in_stock
32.7808,-115.5627,43951193,false
31.866867065429688,-81.61607360839844,963752291,false
31.866867065429688,-81.61607360839844,437914869,false
33.534821,-112.33993,963752291,false
33.534821,-112.33993,437914869,false
26.603342,-80.053131,963752291,false
26.603342,-80.053131,437914869,false
26.603342,-80.053131,884336323,false
34.726711,-82.358597,963752291,false
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@addamh
addamh / handler.js
Last active April 10, 2018 16:59
Fayetteville.js // Serverless Live Demo Project
'use strict';
module.exports.multiply = (event, context, callback) => {
let { queryStringParameters: {a, b} } = event;
const response = {
statusCode: 200,
body: a * b
};

class: center, middle

My Awesome Presentation

???

Notes for the first slide!


@addamh
addamh / controllers.application.js
Created April 26, 2017 17:53
computedpropertiesfireoninputs
import Ember from 'ember';
export default Ember.Controller.extend({
computedPropertyOnSearchTerm: Ember.computed('searchTerm', function() {
$('ul').append('<li>i am firing</li>');
return `(( I am the computed property value -- ${this.get('searchTerm')}))`;
})
});
➜ aws cloudformation describe-stacks --stack-name staging | jq '.Stacks | .[0].Outputs'
[
{
"Description": "RDSDatabaseEndpointDetails",
"OutputKey": "RDSDatabaseEndpointDetail",
"OutputValue": "rds-staging.cg27ingx.us-west-2.rds.amazonaws.com"
}
]
"Outputs" : {
"RDSDatabaseEndpointDetail": {
"Description": "RDSDatabaseEndpointDetails",
"Value": {
"Fn::GetAtt": [
"Database",
"Endpoint.Address"
]
}
}
"Resources": {
"AppInstance": {
"Type": "AWS::EC2::Instance",
"Properties": {
"ImageId": "ami-9c03a89d",
"InstanceType": "t2.micro",
"KeyName": "deploy-key"
}
},
"S3AssetsBucket": {
"Resources" : {
"myEC2Instance" : {
"Type" : "AWS::EC2::Instance",
"Properties" : {
"ImageId" : { "Fn::FindInMap" : [ "RegionMap", { "Ref" : "AWS::Region" }, "32"]},
"InstanceType" : "m1.small"
}
}
}