Skip to content

Instantly share code, notes, and snippets.

@raycohen
raycohen / controllers.application\.js
Last active August 18, 2021 18:17
array lookup vs get
import Controller from '@ember/controller';
export default class ApplicationController extends Controller {
appName = 'Ember Twiddle';
myArray = ['zero', 'one', 'two'];
myIndex = 0;
myMap = {'yellow': 'lemon', 'green': 'lime'}
}
@raycohen
raycohen / 0-Overview.md
Last active March 29, 2019 19:27
`@` as property lookup

Overview

Which of the following code samples would you rather someone with no ember experience see first? Keep in mind this could happen in the Ember guides, on stack overflow, or in a codebase.

@raycohen
raycohen / keybase.md
Created October 16, 2017 17:10
keybase.md

Keybase proof

I hereby claim:

  • I am raycohen on github.
  • I am raycohen (https://keybase.io/raycohen) on keybase.
  • I have a public key ASCkh9JItfXqNAiGSpJIULZPhgQqrujEDRwUhEliXk2B6Qo

To claim this, I am signing this object:

@raycohen
raycohen / weichu-debug-solution
Created September 18, 2017 19:18
Weichu debug solution
/**
* This file represents a simple application where we make 10 api requests to get
* 10 random words back and then append them based on the index of the word at the time the request was made
* There are many things wrong with this file, but when all are fixed the application should log out the list of words (generator.result)
*/
var TOTAL_WORDS = 10;
var resultDiv = document.getElementById('result');
console.log(resultDiv);