First add the bower-rails and the compass-rails gems to your project's Gemfile:
# Gemfile
gem 'compass-rails'
gem 'bower-rails'Run bundle install and then the generator that comes with bower-rails to set everything up:
| ssl_certificate Definition | |
| define :ssl_certificate, action: :create do | |
| cert_dir = File.expand_path("../../files/default", __FILE__) | |
| # Find the host certificate | |
| host_cert = File.join( cert_dir, "*.#{params[:name]}.crt" ) | |
| Chef::Logger.error("Could not locate host certificate for #{params[:name]}!") | |
| # Find the intermediate certificate |
| class Profiler | |
| def self.profile(&block) | |
| result = RubyProf.profile do | |
| block.call | |
| end | |
| printer = RubyProf::GraphPrinter.new(result) | |
| printer.print(STDOUT, {}) | |
| end | |
| end |
| #!/usr/bin/env bash | |
| # | |
| # Rails console script that can be run on AWS Elastic Beanstalk. | |
| # | |
| # Run this script from the app dir (/var/app/current) as root (sudo script/aws-console) | |
| # | |
| set -xe | |
| EB_SCRIPT_DIR=$(/opt/elasticbeanstalk/bin/get-config container -k script_dir) |
First add the bower-rails and the compass-rails gems to your project's Gemfile:
# Gemfile
gem 'compass-rails'
gem 'bower-rails'Run bundle install and then the generator that comes with bower-rails to set everything up:
gem 'carrierwave' to Gemfilebundle install to install the new gemspring stoprails generate uploader Imageimage by adding this in my model's class:| class Beer | |
| # We ONLY want to be able to read @amount, not | |
| # change it without calling "sip!" | |
| attr_reader :amount | |
| def initialize | |
| @amount = 250 | |
| end | |
| def sip! |
git clone [email protected]:NAME/REPO.git| import SocketClient from 'socket.io-client'; | |
| import Feathers from 'feathers-client'; | |
| import Utils from '../lib/Utils'; | |
| const API_HOST = "http://localhost:3030"; | |
| class BaseModel { | |
| defaults() { return {}; } | |
| constructor(resource_name, host = API_HOST) { |
| class Utils { | |
| uuid() { | |
| var i, random; | |
| var uuid = ''; | |
| for (i = 0; i < 32; i++) { | |
| random = Math.random() * 16 | 0; | |
| if (i === 8 || i === 12 || i === 16 || i === 20) { | |
| uuid += '-'; | |
| } |