https://devcenter.heroku.com/articles/custom-domains http://thenomadicfreelancer.blogspot.com/2012/08/pointing-godaddy-domain-to-your-heroku.html
For each custom subdomain use domains:add in the Terminal.
https://devcenter.heroku.com/articles/custom-domains http://thenomadicfreelancer.blogspot.com/2012/08/pointing-godaddy-domain-to-your-heroku.html
For each custom subdomain use domains:add in the Terminal.
| #include <FastSPI_LED2.h> | |
| #define DEBUG | |
| #define LED_COUNT 60 // BlinkyTape has 60 LEDs! | |
| struct CRGB leds[LED_COUNT]; // this struct contains 60 CRGB values. This is where | |
| #define LED_MAX_BRIGHTNESS 55 | |
| #define PIN_BUTTON 10 |
| app = angular.module 'BlogExample', [] | |
| # Simple controller that loads all blog posts | |
| app.controller 'BlogCtrl', ['$scope', 'Blog', ($scope, Blog) -> | |
| # Get all the blog posts | |
| Blog.all().then (posts) -> | |
| $scope.posts = posts | |
| # Extend the $scope with our own properties, all in one big block | |
| # I like this because it looks like declaring a class. |
| source "https://rubygems.org" | |
| gem "devise", git: "git://github.com/plataformatec/devise.git", branch: "rails4" | |
| gem "devise-i18n", "~> 0.6.5" | |
| gem "jbuilder", "~> 1.0.1" | |
| gem "jquery-rails" | |
| gem "haml", "~> 4.0.1" | |
| gem "mongoid", git: "git://github.com/mongoid/mongoid.git", branch: "master" | |
| gem "simple_form", "~> 3.0.0.beta1" | |
| gem "rails", "4.0.0.beta1" |
| data:text/html, <style type="text/css">#e{position:absolute;top:0;right:0;bottom:0;left:0;}</style><div id="e"></div><script src="http://d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js" type="text/javascript" charset="utf-8"></script><script>var e=ace.edit("e");e.setTheme("ace/theme/monokai");e.getSession().setMode("ace/mode/ruby");</script> |
| require 'active_record' | |
| require 'arel' | |
| # Ruby-like syntax in AR conditions using the underlying Arel layer (Rails >= 3.0). | |
| # | |
| # What you would usually write like this: | |
| # | |
| # User.where(["users.created_at > ? AND users.name LIKE ?", Date.yesterday, "Mary"]) | |
| # | |
| # can now be written like this (note those parentheses required by the operators precedences): |
| literally always have to look up the meaning of :limit in migrations when it comes to integer values. Here's an overview. Now let's memorise it (oh, this works for MySQL, other databases may work differently): | |
| :limit Numeric Type Column Size Max value | |
| 1 tinyint 1 byte 127 | |
| 2 smallint 2 bytes 32767 | |
| 3 mediumint 3 byte 8388607 | |
| nil, 4, 11 int(11) 4 byte 2147483647 | |
| 5..8 bigint 8 byte 9223372036854775807 | |
| Note: by default MySQL uses signed integers and Rails has no way (that I know of) to change this behaviour. Subsequently, the max. values noted are for signed integers. |
| require 'yaml' | |
| require 'logger' | |
| require 'active_record' | |
| namespace :db do | |
| def create_database config | |
| options = {:charset => 'utf8', :collation => 'utf8_unicode_ci'} | |
| create_db = lambda do |config| | |
| ActiveRecord::Base.establish_connection config.merge('database' => nil) |
| class ApplicationController < ActionController::Base | |
| before_filter :delay_xhr | |
| protected | |
| def delay_xhr | |
| session[:delay_ajax] = params[:delay_ajax].to_i unless params[:delay_ajax].blank? | |
| sleep session[:delay_ajax] if !session[:delay_ajax].nil? && session[:delay_ajax] > 0 && request.xhr? | |
| end |