git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
========================================================================================================== | |
MySQL Guide - Basics | |
========================================================================================================== | |
Connect/Disconnect from MySQL Server | |
---------------------------------------------------------------------------------------------------------- | |
:~ sudo mysqld_safe //Turns on MySQL server | |
:~ mysql -h host -u root -p //Connects to MySQL server: "no need to specify host on local" | |
mysql> quit; //Disconnects from MySQL | |
:~ mysqladmin -u root -p shutdown //Shuts down MySQL server | |
---------------------------------------------------------------------------------------------------------- |
# MySQL. Versions 4.1 and 5.0 are recommended. | |
# | |
# Install the MySQL driver: | |
# gem install mysql2 | |
# | |
# And be sure to use new-style password hashing: | |
# http://dev.mysql.com/doc/refman/5.0/en/old-client.html | |
development: | |
adapter: mysql2 | |
encoding: utf8 |
Steps to install and run PostgreSQL 9.2 using Homebrew (Mac OS X) | |
(if you aren't using version 9.1.5, change line 6 with the correct version) | |
1. launchctl unload -w ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist | |
2. mv /usr/local/var/postgres /usr/local/var/postgres91 | |
3. brew update | |
4. brew upgrade postgresql | |
5. initdb /usr/local/var/postgres -E utf8 | |
6. pg_upgrade -b /usr/local/Cellar/postgresql/9.1.5/bin -B /usr/local/Cellar/postgresql/9.2.0/bin -d /usr/local/var/postgres91 -D /usr/local/var/postgres | |
7. cp /usr/local/Cellar/postgresql/9.2.0/homebrew.mxcl.postgresql.plist ~/Library/LaunchAgents/ |
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
appName: 'Ember Twiddle' | |
}); |
let fuzzyNames = { | |
_andConcat({ list, last }) { | |
return `${list.join(', ')} and ${last.join('')}`; | |
}, | |
_lengthConcat({ list, rest }) { | |
let others = rest.length === 1 ? "other" : "others"; | |
return `${list.join(', ')} and ${rest.length} ${others}`; | |
}, |
import Ember from 'ember'; | |
export default Ember.Component.extend({ | |
input(e) { | |
// The `mut` helper changes the `appName` value to what | |
// is provided as the `action` argument. | |
this.get('onNewValue')(e.target.value); | |
} | |
}); |
import Ember from 'ember'; | |
const { Component, computed } = Ember; | |
export default Component.extend({ | |
tagName: 'button', | |
type: 'button', | |
classNames: ['accordion-item__header'], | |
attributeBindings: ['type', 'aria-expanded', 'aria-controls'], | |
'aria-expanded': computed('isExpanded', function() { |
import Ember from 'ember'; | |
const TOOLBAR_OPTIONS = [ | |
['bold', 'italic', 'underline'], | |
[ | |
{'list': 'ordered'}, | |
{'list': 'bullet'}, | |
{'script': 'sub'}, | |
{'script': 'super'}, | |
'link', |
import Ember from 'ember'; | |
export default Ember.Component.extend({ | |
isOpen: false, | |
init() { | |
this._super(...arguments); | |
setTimeout(() => { | |
console.log('3 seconds later...'); |