Brainstorming by Peter B Smith
- Develop a test suite of ~100 routes to build out
- Query by:
- Date
- API Key
- Query by:
- Sever from scratch
- 1,000 requests per second test suite
- 10 - 100 routes and Queries
fetch("https://fcctop100.herokuapp.com/api/fccusers/top/recent") | |
.then(response => { | |
return response.json().then(json => ({ json, response })) | |
}).then(({ json, response }) => { | |
if (!response.ok) { | |
return Promise.reject(json); | |
} | |
// Do Stuff with JSON HERE | |
// for example... |
function takesACallBack(something, callback) { | |
callback(something); | |
} | |
function logger(argument) { | |
console.log(argument); |
Brainstorming by Peter B Smith
--- | |
# roles/auto-scaling/tasks/main.yml | |
- name: Retrieve current Auto Scaling Group properties | |
command: "aws --region {{ region }} autoscaling describe-auto-scaling-groups --auto-scaling-group-names webapp" | |
register: asg_properties_result | |
- name: Set asg_properties variable from JSON output if the Auto Scaling Group already exists | |
set_fact: | |
asg_properties: "{{ (asg_properties_result.stdout | from_json).AutoScalingGroups[0] }}" |
local crud = require "kong.api.crud_helpers" | |
local helpers = require "kong.plugins.YOUR-PLUGIN.helpers" | |
return { | |
["/fantastics/"] = { | |
POST = function(self, dao_factory) | |
crud.post(self.params, dao_factory.voices) | |
end, |
<!-- Drip --> | |
<script type="text/javascript"> | |
var _dcq = _dcq || []; | |
var _dcs = _dcs || {}; | |
_dcs.account = '<YOUR_ACCOUNT_ID>'; | |
(function() { | |
var dc = document.createElement('script'); | |
dc.type = 'text/javascript'; dc.async = true; | |
dc.src = '//tag.getdrip.com/<YOUR_ACCOUNT_ID>.js'; |
declare const _dcq: any; |
declare const _dcq: any; | |
import { Injectable } from '@angular/core'; | |
@Injectable() | |
export class DripService { | |
submitSubscriber() { | |
return new Promise((resolve, reject) => { | |
_dcq.push(["identify", { | |
email: "[email protected]", |
import { Component } from '@angular/core'; | |
import { DripService } from './drip.service'; | |
@Component({ | |
selector: 'app-root', | |
template: ` | |
<h1> | |
{{ (response | async)?.email }} | |
</h1> | |
` |
import { Injectable } from '@angular/core'; | |
import { Http, Response } from '@angular/http'; | |
import { Observable } from 'rxjs/Observable'; | |
import 'rxjs/add/operator/catch'; | |
import 'rxjs/add/operator/map'; | |
@Injectable() | |
export class UserService { | |
private usersUrl = 'https://jsonplaceholder.typicode.com/users'; |