- Clone sample app:
https://github.com/damianFC/alexa-rubykit
- Install eb (elastic beanstock command line tool)
- Guide:
- Command for osx:
curl -s https://s3.amazonaws.com/elasticbeanstalk-cli-resources/install-ebcli.py | python
# lib/tasks/db.rake | |
namespace :db do | |
desc "Dumps the database to db/APP_NAME.dump" | |
task :dump => :environment do | |
cmd = nil | |
with_config do |app, host, db, user| | |
cmd = "pg_dump --host #{host} --username #{user} --verbose --clean --no-owner --no-acl --format=c #{db} > #{Rails.root}/db/#{app}.dump" | |
end | |
puts cmd |
class HomeScreen < PMWebScreen | |
uses_action_bar false | |
title "Web View" | |
stylesheet HomeScreenStylesheet | |
def on_load | |
@current_url = 'https://www.tacobell.com' | |
open_url(@current_url) | |
end |
https://github.com/damianFC/alexa-rubykit
curl -s https://s3.amazonaws.com/elasticbeanstalk-cli-resources/install-ebcli.py | python
source 'https://rubygems.org' | |
ruby '2.2.2' | |
gem 'rails', '~> 4.2.1' | |
gem 'pg' | |
gem 'puma' | |
gem 'devise' | |
gem 'figaro' |
# detect `$rvm_path` | |
if [ -z "${rvm_path:-}" ] && [ -x "${HOME:-}/.rvm/bin/rvm" ] | |
then rvm_path="${HOME:-}/.rvm" | |
fi | |
if [ -z "${rvm_path:-}" ] && [ -x "/usr/local/rvm/bin/rvm" ] | |
then rvm_path="/usr/local/rvm" | |
fi | |
# load environment of current project ruby | |
if |
class @GoogleAnalytics | |
@load: -> | |
# Google Analytics depends on a global _gaq array. window is the global scope. | |
window._gaq = [] | |
window._gaq.push ["_setAccount", GoogleAnalytics.analyticsId()] | |
# Create a script element and insert it in the DOM | |
ga = document.createElement("script") | |
ga.type = "text/javascript" |
user = User.find_or_create_by!(email: "[email protected]") do |user| | |
user.password= '12345678' | |
user.password_confirmation= '12345678' | |
end | |
puts "created #{user.email}" | |
25.times do | |
photo = open("http://placekitten.com/g/#{Random.rand(300..600)}/#{Random.rand(300..600)}") | |
photo = user.pictures.create(title: 'Awesome Cat', description: 'Awesome Cat Description', photo: photo, category: 'Cat') | |
puts "created cat photo for #{user.email}" |
#fix git
$ git credential-osxkeychain erase
host=github.com
protocol=https
[hit return]
#Heroku Setup
This information can be found in more detail here: https://devcenter.heroku.com/articles/getting-started-with-rails3#prerequisites
###Prerequisites
#Conway's Game of Life
###Goal
###Basics