Skip to content

Instantly share code, notes, and snippets.

View poteto's full-sized avatar
🥔
ポテト

lauren poteto

🥔
ポテト
View GitHub Profile
@poteto
poteto / upgrade.md
Last active June 10, 2016 04:37
Upgrading to El Capitan

This should be fairly straightforward. Backup your Mac with Time Machine before attempting an upgrade, and set aside 1-2 hours for it.

If you have Homebrew installed, you should do the following:

  1. BEFORE INSTALLING EL CAPITAN, move /usr/local/ out of /usr

    sudo mv /usr/local ~/local
  2. AFTER INSTALLING EL CAPITAN, merge the directory back into /usr/local

@poteto
poteto / fp1.js
Last active November 14, 2015 01:38
// birth-day/component.js
import Ember from 'ember';
import moment from 'moment';
const {
Component,
computed,
get,
set
} = Ember;
{{!birth-day/template.hbs}}
{{input value=birthDate placeholder="Your birthday"}}
<p>
You are currently {{age}} years old.
{{#if isBirthday}}
Happy birthday!
{{/if}}
</p>
@poteto
poteto / fp2.js
Last active November 14, 2015 01:38
// birth-day/component.js
import Ember from 'ember';
import moment from 'moment';
const {
Component,
computed,
get
} = Ember;
@poteto
poteto / fp3.js
Last active November 26, 2015 12:45
// birth-day/component.js
import Ember from 'ember';
import moment from 'moment';
const {
Component,
computed,
get
} = Ember;
{{!index/template.hbs}}
{{one-way-input
value=user.birthDate
update=(action (mut user.birthDate))
placeholder="Your birthday"
}}
{{happy-birthday today=today birthDate=user.birthDate}}
{{!birth-day/template.hbs}}
<p>
You are currently {{age}} years old.
{{#if isBirthday}}
Happy birthday!
{{/if}}
</p>
@poteto
poteto / fp4.js
Last active November 14, 2015 01:37
// birth-day/component.js
import Ember from 'ember';
import moment from 'moment';
const {
Component,
computed,
get
} = Ember;
@poteto
poteto / fp4.hbs
Last active November 17, 2015 16:19
{{!birth-day/template.hbs}}
{{one-way-input
value=birthDate
update=(action "checkBirthday")
placeholder="Your birthday"
}}
<p>
You are currently {{age}} years old.
{{#if isBirthday}}
// index/controller.js
import Ember from 'ember';
const { Controller, set } = Ember;
export default Controller.extend({
actions: {
setIsBirthday(isBirthday) {
set(this, 'user.isBirthday', isBirthday);
user.save();