This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DemoApp.PlayersShowController = Ember.ObjectController.extend | |
swords: Ember.$.getJSON '/swords' | |
matches: (-> | |
@get('model.matches').map (match) -> | |
sword = swords.findBy('external_id', match.sword_id) | |
name = sword.name.replace('lalala_', '') | |
match.sword = | |
img: "/images/sword_#{name}_sb.png" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DemoApp.PlayersShowRoute = Ember.Route.extend | |
model: (params) -> | |
Ember.$.getJSON '/players/' + params.id |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DemoApp.PlayersShowRoute = Ember.Route.extend | |
model: (params) -> | |
Ember.$.getJSON '/players/' + params.id |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DemoApp.PlayersRoute = Ember.Route.extend | |
model: -> | |
Ember.$.getJSON '/players' | |
DemoApp.PlayersShowRoute = Ember.Route.extend | |
model: (params) -> | |
Ember.$.getJSON '/players/' + params.id |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DemoApp.PlayersShowController = Ember.ObjectController.extend | |
needs: 'application' | |
filteredMatches: ( -> | |
hero_id = @get('model.filters.hero_id') | |
if hero_id | |
@get('model.matches').filterBy('hero_id', hero_id) | |
else | |
@get('model.matches') | |
).property('model.filters.hero_id') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apt_repository 'postgresql-9.3' do | |
uri 'http://ppa.launchpad.net/chris-lea/postgresql-9.3/ubuntu' | |
distribution 'precise' | |
components ['main'] | |
keyserver 'keyserver.ubuntu.com' | |
key 'D878D6C2' | |
deb_src true | |
end | |
execute 'apt-key-update' do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
➜ ~ nmap 172.20.10.0/24 | |
Starting Nmap 6.47 ( http://nmap.org ) at 2015-04-29 10:22 PDT | |
Nmap scan report for 172.20.10.1 | |
Host is up (0.00092s latency). | |
Not shown: 998 closed ports | |
PORT STATE SERVICE | |
21/tcp open ftp | |
62078/tcp open iphone-sync |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
notifier_settings do | |
to "john@gmail.com" | |
from "john@gmail.com" | |
smtp do | |
host "mail.google.com.com" | |
port "587" | |
username "john" | |
password "password" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
formElement.addEvent('submit', function(e) { | |
e.stop(); | |
this.send(); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# GET /replies/1 | |
def show | |
if request.xhr? | |
@reply = Reply.find(params[:id]) | |
render :partial => 'instruction_items/reply', :locals => {:reply => @reply} | |
end | |
end |
OlderNewer