In Ember, the application's state manager handles routing. Let's take a look at a simple example:
App.stateManager = Ember.StateManager.create({
start: Ember.State.extend({
index: Ember.State.extend({
route: "/",
:e <some file> | |
:vsp <another file> " for vertical split | |
:sp <yet another file> " for horizontal split | |
:e path/to/file | |
:Rmodel <model name> # search for models | |
cmd + shift + f # Ack search word throughout files | |
Test public/private keypairs | |
http://stackoverflow.com/questions/274560/how-do-you-test-a-public-private-keypair | |
h1. Sublime Text 2 - Useful Shortcuts (Mac OS X) | |
h2. General | |
| *⌘T* | go to file | | |
| *⌘⌃P* | go to project | | |
| *⌘R* | go to methods | | |
| *⌃G* | go to line | | |
| *⌘KB* | toggle side bar | | |
| *⌘⇧P* | command prompt | |
git diff --cached | |
## git diff of files that have been staged ie 'git add'ed | |
git reset HEAD <FILE> | |
## remove file from current index (commited area) | |
setup .git/config to include multiple remote locations | |
http://stackoverflow.com/questions/849308/pull-push-from-multiple-remote-locations |
PROMPT='%{$fg[cyan]%}%1~%{$reset_color%}%{$fg[red]%}|%{$reset_color%}%{$fg[green]%}⇒ %{$reset_color%}' | |
# RPS1='%{$fg[blue]%}%~%{$reset_color%} ' | |
RPS1='%{$fg[white]%}%2~$(git_prompt_info) %{$fg_bold[blue]%}%m%{$reset_color%}' | |
ZSH_THEME_GIT_PROMPT_PREFIX=" (%{$fg[yellow]%}" | |
ZSH_THEME_GIT_PROMPT_SUFFIX=")%{$reset_color%}" | |
ZSH_THEME_GIT_PROMPT_CLEAN="" | |
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%} ⚡%{$fg[yellow]%}" | |
Recently, we've been working on extracting Ember conventions from applications we're working on into the framework. Our goal is to make it clearer how the parts of an Ember application work together, and how to organize and bootstrap your objects.
Routing is an important part of web applications. It allows your users to share the URL they see in their browser, and have the same things appear when their friends click on the link.
The Ember.js ecosystem has several great solutions for routing. But, since it is such an important part of most web applications, we've decided to build it right into the framework.
If you have already modeled your application state using Ember.StateManager
, there are a few changes you'll need to make to enable routing. Once you've made those changes, you'll notice the browser's address bar spring to life as you start using your app—just by moving between states, Ember.js will update the URL automatically.
# Collection of Rails snippets for use in production/deployment | |
bundle exec rails console production | |
# Restart Apache2 | |
$ sudo /etc/init.d/apache2 restart |