I use Namecheap.com as a registrar, and they resale SSL Certs from a number of other companies, including Comodo.
These are the steps I went through to set up an SSL cert.
# Run external command and abort on failure | |
def shell(*cmd) | |
return if cmd.empty? | |
prog = cmd.first.to_s.split.first | |
abort "#{prog}: command not found" if `which #{prog}`.empty? | |
system *cmd | |
abort "#{prog}: interrupted, signal #{$?.termsig}" if $?.signaled? | |
abort "#{prog}: execution failed, exit code #{$?.exitstatus}" unless $?.success? | |
end |
### USAGE | |
### | |
### ./ElasticSearch.sh 1.5.0 will install Elasticsearch 1.5.0 | |
### ./ElasticSearch.sh 1.4.4 will install Elasticsearch 1.4.4 | |
### ./ElasticSearch.sh will fail because no version was specified (exit code 1) | |
### | |
### CLI options Contributed by @janpieper | |
### Check http://www.elasticsearch.org/download/ for latest version of ElasticSearch | |
### ElasticSearch version |
I use Namecheap.com as a registrar, and they resale SSL Certs from a number of other companies, including Comodo.
These are the steps I went through to set up an SSL cert.
Ensure regex button is selected and then type this in the search field. | |
\s*console\.log(.*); |
module YourApp | |
class Application < Rails::Application | |
# ... | |
config.middleware.insert_before "Rack::Cache", "SubdomainRedirect" | |
# ... | |
end | |
end |
require 'observer' | |
class CoffeeShop | |
include Observable | |
attr_reader :customers | |
def initialize(name, capacity) | |
@name = name | |
@capacity = capacity | |
@customers = [] |
class Coffee | |
attr_accessor :name | |
attr_accessor :strength | |
def initialize(name, strength) | |
@name = name | |
@strength = strength | |
end | |
def <=>(other_coffee) |
class ReportsController < ApplicationController | |
def group_columns columns, items | |
numitems = items.length | |
rows = numitems / columns | |
rows += 1 if numitems % columns > 0 | |
extras = numitems % rows if rows > 0 | |
1.upto(rows).map { |rownum| | |
# distribute the extras evenly | |
extra = 0 |
# | |
# Shared definition of ruby microservice | |
# | |
microservice: | |
command: "runsvdir /etc/service" | |
environment: | |
PORT: 3000 | |
RAILS_ENV: development | |
SERVICE_PLATFORM: "mia" | |
ports: |