- Create a self signed key and certificate ( good explanation here )
- Using puma (gem 'puma') do:
puma -b 'ssl://0.0.0.0:3000?key=/path/to/server.key&cert=/path/to/server.crt'
now go to: https://localhost:3000
var PostList = React.createClass({ | |
render: function() { | |
var postNodes = this.props.data.map(function (post) { | |
return ( | |
<Post key={post.Id} title={post.Title}> | |
{post.Blog} | |
</Post> | |
); | |
}); |
package models | |
import ( | |
"github.com/astaxie/beego/orm" | |
"github.com/astaxie/beego/validation" | |
"time" | |
"fmt" | |
"strconv" | |
"errors" | |
) |
package controllers | |
import ( | |
"beego_react/models" | |
"github.com/astaxie/beego" | |
"strconv" | |
) | |
type PostController struct { | |
beego.Controller |
foreman-rake console | |
f = Fog::Compute.new(:provider => "vsphere", :vsphere_username => "YOUR_USERNAME", :vsphere_password=> "YOUR_PASSWORD", :vsphere_server => "SERVER_IP", :vsphere_expected_pubkey_hash => "HASH_KEY_FROM_FOREMAN_e50d75d6039b177eb5ec59f79d147c") | |
f.datacenters |
puma -b 'ssl://0.0.0.0:3000?key=/path/to/server.key&cert=/path/to/server.crt'
now go to: https://localhost:3000
# Puppet status codes say 0 for unchanged, 2 for changed succesfully | |
if [0,2].include? @kafo.exit_code | |
say " <%= color('Success!', :good) %>" | |
else | |
say " <%= color('Something went wrong!', :bad) %> Check the log for ERROR-level output" | |
end | |
# Foreman UI? | |
if @kafo.config.module_enabled? 'foreman' | |
say " * <%= color('Foreman', :info) %> is running at <%= color('#{param('foreman','foreman_url').value}', :info) %>" |
# put this below in your application.rb | |
module AssetsInitializers | |
class Railtie < Rails::Railtie | |
initializer "assets_initializers.initialize_rails", | |
:group => :assets do |app| | |
require "#{Rails.root}/lib/settings.rb" | |
end | |
end | |
end |
/home/ubuntu/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.10/lib/active_record/connection_adapters/postgresql_adapter.rb:1061:in `async_exec' | |
/home/ubuntu/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.10/lib/active_record/connection_adapters/postgresql_adapter.rb:1061:in `exec_no_cache' | |
/home/ubuntu/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.10/lib/active_record/connection_adapters/postgresql_adapter.rb:615:in `block in exec_query' | |
/home/ubuntu/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.10/lib/active_record/connection_adapters/abstract_adapter.rb:245:in `block in log' | |
/home/ubuntu/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.10/lib/active_support/notifications/instrumenter.rb:21:in `instrument' | |
/home/ubuntu/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.10/lib/active_record/connection_adapters/abstract_adapter.rb:240:in `log' | |
/home/ubuntu/.rvm/gems/ruby-1.9.2-p290/gems/newrelic_rpm-3.5.5.38/lib/new_relic/agent/instrumentation/active_record.rb:32:in `block in log_with_newrelic_instrumentati |
<%= form_for @book, :html => {:multipart => true} do |f| %> | |
<% if @book.errors.any? %> | |
<div id="error_explanation"> | |
<h2><%= pluralize(@book.errors.count, "error") %> prohibited this book from being saved:</h2> | |
<ul> | |
<% @book.errors.full_messages.each do |msg| %> | |
<li><%= msg %></li> | |
<% end %> | |
</ul> |
module Docsplit | |
def self.extract_svg(pdfs, opts={}) | |
pdfs = ensure_pdfs(pdfs) | |
SvgExtractor.new.extract(pdfs, opts) | |
end | |
class SvgExtractor |