This file contains hidden or 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
#!/bin/bash | |
# WEB SERVER | |
sudo apt-get update | |
sudo apt-get install nginx | |
# APPS FROM SOURCE | |
cd /usr/local/src/ | |
# PHP (w/FPM for NGINX) |
This file contains hidden or 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
# form for books#create page | |
<%= simple_form_for(@book, :html => { :multipart => true }) do |f| %> | |
<%= f.error_notification %> | |
<div class="inputs"> | |
<%= f.file_field :jacket_cover %> | |
<%= f.input :title %> | |
<%= f.input :synopsis, :as => :ckeditor, :label => false, :input_html => { :ckeditor => { :toolbar => 'Full', :height => 400 } } %> | |
<%= f.input :body, :as => :ckeditor, :label => false, :input_html => { :ckeditor => { :toolbar => 'Full', :height => 400 } } %> | |
<%= f.input :age %> |
This file contains hidden or 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
import Ember from 'ember'; | |
import config from 'minutebase/config/environment'; | |
export default Ember.Component.extend({ | |
classNames: "google-static-map", | |
tagName: "img", | |
attributeBindings: ["src"], | |
width: Ember.computed(function() { | |
return this.element && this.$().width(); |
This file contains hidden or 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
import Ember from 'ember'; | |
import config from 'minutebase/config/environment'; | |
export default Ember.Component.extend({ | |
classNames: "google-static-map", | |
tagName: "img", | |
attributeBindings: ["src"], | |
width: Ember.computed("viewport.width", { | |
get() { |
This file contains hidden or 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
import Ember from 'ember'; | |
const { computed, typeOf } = Ember; | |
export default Ember.Component.extend({ | |
value: computed({ | |
set(param, value) { | |
switch(typeOf(value)) { | |
case "string": | |
this._value = value === 'foo' ? 'bar' : value; | |
break; |
This file contains hidden or 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
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
appName: 'Ember Twiddle', | |
colors: ['green', 'red', 'blue'], | |
actions: { | |
reorder(colors) { | |
this.set('colors', colors); |