Skip to content

Instantly share code, notes, and snippets.

View mitchlloyd's full-sized avatar

Mitch Lloyd mitchlloyd

View GitHub Profile
@mitchlloyd
mitchlloyd / depedencies.js
Created July 22, 2020 17:26
CDK dependencies gitter
// In consumer
"devDependencies": {
"@aws-cdk/assert": "1.46.0",
"@types/jest": "^24.0.22",
"@types/node": "^13.13.12",
"aws-cdk": "1.46.0",
"jest": "^24.9.0",
"ts-jest": "^24.2.0",
"ts-node": "^8.10.2",
"typescript": "^3.9.5"

Looked at all the process logs and took notes. For middlemanager I copied:

Connection timed out 10.204.148.226:8081
Retries exhausted, couldn't fulfill request to [http://10.204.148.226:8081/druid/indexer/v1/taskStatus]

And wrote a note:

@mitchlloyd
mitchlloyd / after-search-layout.jsx
Last active August 22, 2017 02:47
Tunneling props through an intermediate component
import React from 'react';
const SearchLayout = (props) => (
<div>
<h2>My Great Search</h2>
{props.field}
<hr />
{props.results}
</div>
);
@mitchlloyd
mitchlloyd / dog-survey.html
Created July 14, 2017 16:58
declarative react example
<script src="https://unpkg.com/[email protected]/dist/react.js"></script>
<script src="https://unpkg.com/[email protected]/dist/react-dom.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/babel-core/5.8.24/browser.min.js"></script>
<title>React</title>
<div id="app"></div>
<script type="text/babel">
class App extends React.Component {
constructor() {
@mitchlloyd
mitchlloyd / vanilla.html
Created July 14, 2017 15:10
vanilla-imperative-example
<!-- The initial UI -->
<title>Vanilla</title>
<div class="has-dog-question">
<p>Do you have a dog?</p>
<label>
<input type="radio" name="hasDog" value="yes">
Yes
</label>
import Ember from 'ember';
export default Ember.Component.extend({
init() {
this._super(...arguments);
this.set('foo', 1);
this.destroy();
},
willDestroy() {
import Ember from 'ember';
let answer = 0;
export default Ember.Component.extend({
isSaving: false,
clickCount: 0,
actions: {
cancel() {
@mitchlloyd
mitchlloyd / resources.md
Last active January 24, 2017 22:58
Some software productivity resources

Getting Things Done by David Allen - This is a personal productivity system that encourages capturing all "projects" and being intentional about what the single "next action" is for any given project.

User Story Mapping by Jeff Patton - Honestly I did not read all of this and I probably should. However, I know this was very influential for people that I've worked with.

Kanban Development Oversimplified by Jeff Patton - This blog post does a good job of summarizing Kanban ideas in the context of Scrum and Agile.

Growing Object Oriented Software Guided by Tests by Nat Pryce and Steve Freeman - This includes a nice overview of an "outside-in" approach to software development using tests. The concept of a "walking skeleton" has been very useful for me.

Dreaming in Code by Scott Rosenburge - It's been a while since I read this but I know it covers things like "Mythical Man Month" in a story driven way.

@mitchlloyd
mitchlloyd / apple-pay.js
Last active January 13, 2017 22:55
Wrap Third Party APIs - Adapter
/* globals Stripe, ApplePaySession*/
import Ember from 'ember';
const { Service, RSVP, run } = Ember;
export default Service.extend({
charge(paymentRequest) {
return new RSVP.Promise(function(resolve, reject) {
let runLoopResolve = (...args) => run.join(() => resolve(...args));
let runLoopReject = (...args) => run.join(() => reject(...args));
Stripe.applePay.buildSession(paymentRequest, buildSuccessHandler(runLoopResolve), runLoopReject).begin();
@mitchlloyd
mitchlloyd / apple-pay.js
Last active January 13, 2017 21:34
Wrap Third Party APIs - Fake
import Ember from 'ember';
const { Service, RSVP } = Ember;
export default Service.extend({
init() {
this._super(...arguments);
// We record both the charges sent and notifications sent to verify in
// our tests.
this.chargesSent = [];