Skip to content

Instantly share code, notes, and snippets.

View elwayman02's full-sized avatar

Jordan Hawker elwayman02

View GitHub Profile
@elwayman02
elwayman02 / Package Managers.md
Created September 9, 2015 01:55
What's a Package Manager?

A: What's Bower?

B: It's a package manager, you install it with NPM.

A: What's NPM?

B: It's a package manager, you install it with Brew.

A: What's Brew?

@elwayman02
elwayman02 / ember_examples.md
Last active September 10, 2015 02:41 — forked from rwjblue/ember_examples.md
Ember Examples
@elwayman02
elwayman02 / unplug.md
Last active November 29, 2016 13:10
Save Plug.DJ Playlists
  1. Login to plug.dj
  2. Visit this url: https://plug.dj/_/playlists
  3. Copy the resulting JSON into a text editor for reference. Mine is pasted below.
  4. Select the playlist you want to save and copy its id (such as 6782961)
  5. Visit this url, putting your playlist id in where it says [ID]: https://plug.dj/_/playlists/[ID]/media (ex: https://plug.dj/_/playlists/8096724/media)
  6. Copy the resulting JSON into a text editor for reference.

Note: This will only work for your own playlists, and only while you are logged in. Other user's playlist ids (such as the examples above) will return empty results.

YouTube

import Ember from 'ember';
export default Ember.Controller.extend({
appName:'Ember Twiddle'
});
@elwayman02
elwayman02 / application.controller.js
Last active September 17, 2015 14:35
sendAction problem
import Ember from 'ember';
export default Ember.Controller.extend({
appName:'Ember Twiddle',
toggle: false,
actions: {
nextVideo() {
this.toggleProperty('toggle');
}
@elwayman02
elwayman02 / hate.coffee
Last active September 26, 2015 18:14
Why I Hate CoffeeScript
(if "" is val then null else (if "true" is val then true else (if "false" is val then false else (-1 isnt val.indexOf(",") and (val = val.split(",")) val))))
import Ember from 'ember';
export default Ember.Controller.extend({
appName:'Ember Twiddle'
});

This section explains the basic styles and patterns used in our JavaScript code. It borrows heavily from established resources at other companies that have extensive experience with JS, such as Yahoo, Google, and Mozilla. This guide is written with ES6 syntax in mind.

Some interesting JavaScript tips and gotchas can be found here

Table Of Contents

  1. Comments
  2. Strings