Skip to content

Instantly share code, notes, and snippets.

import Ember from 'ember';
let answer = 0;
export default Ember.Component.extend({
isSaving: false,
clickCount: 0,
actions: {
cancel() {
import Ember from 'ember';
export default Ember.Component.extend({
init() {
this._super(...arguments);
this.set('foo', 1);
this.destroy();
},
willDestroy() {
@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>
@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 / 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>
);

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 / 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"