You make a gist, and then you copy and paste what is in the browser url.
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
<!-- config.js --> | |
applicationModuleVendorDependencies = ['ngCookies', 'ngAnimate', 'ngTouch', 'ngSanitize', 'ui.router', 'ui.bootstrap', 'ui.utils', 'leaflet-directive']; | |
<!-- application.js --> | |
angular.module(ApplicationConfiguration.applicationModuleName, ApplicationConfiguration.applicationModuleVendorDependencies); | |
<!-- layout.server.view.html --> |
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
Your smallest next problem: | |
Make this command: | |
rails console$ Course.first.exercises | |
Produce (something like) this result: | |
>[{exercise 1 info}, {exercise 2 info}] |
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
desc "Remote console" | |
task :console, :roles => :app do | |
server = find_servers(:roles => [:app]).first | |
run_with_tty server, %W( ./script/rails console #{rails_env} ) | |
end | |
desc "Remote dbconsole" | |
task :dbconsole, :roles => :app do | |
env = "production" | |
server = find_servers(:roles => [:app]).first |
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
= link_to "New Category", new_category_path, :class => 'button primary table-action-button large' | |
%h2.section-title Categories | |
#applications.data | |
- if @categories.any? | |
%table.list-items.white | |
= render "table_header" | |
= render @categories |
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
def events | |
response.headers["Content-Type"] = "text/event-stream" | |
while(true) do | |
... | |
response.stream.write "data: #{x.to_json}\n\n" | |
end | |
rescue IOError | |
logger.info "Stream has closed" | |
ensure |
#do as ec2-user
TODO: mark that I created a user with the name deploy. useradd -c "Friendly Version User Name" -s /bin/bash -m username
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
require 'faker' | |
# Create 15 topics | |
topics = [] | |
15.times do | |
topics << Topic.create( | |
name: Faker::Lorem.words(rand(1..10)).join(" "), | |
description: Faker::Lorem.paragraph(rand(1..4)) | |
) | |
end |
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
2013-02-06T22:42:52+00:00 app[web.1]: ActionView::Template::Error (undefined method `first' for nil:NilClass): | |
2013-02-06T22:42:52+00:00 app[web.1]: 119: | |
2013-02-06T22:42:52+00:00 app[web.1]: 120: <script> | |
2013-02-06T22:42:52+00:00 heroku[router]: at=info method=GET path=/ host=pell-discourse.herokuapp.com fwd=4.59.160.126 dyno=web.1 queue=0 wait=0ms connect=2ms service=223ms status=500 bytes=0 | |
2013-02-06T22:42:52+00:00 app[web.1]: 121: Discourse.CDN = '<%= Rails.configuration.action_controller.asset_host %>'; | |
2013-02-06T22:42:52+00:00 app[web.1]: 122: Discourse.BaseUrl = '<%= RailsMultisite::ConnectionManagement.current_hostname %>'; | |
2013-02-06T22:42:52+00:00 app[web.1]: 123: Discourse.Environment = '<%= Rails.env %>'; | |
2013-02-06T22:42:52+00:00 app[web.1]: 124: window.Discourse.Router.map(function() { | |
2013-02-06T22:42:52+00:00 app[web.1]: 125: return Discourse.routeBuilder.call(this); | |
2013-02-06T22:42:52+00:00 app[web.1]: app/views/layouts/ |
NewerOlder