This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Add this in the environments/development.rb to view the output of the server directly from the terminal | |
# Config Logger. | |
config.logger = Logger.new(STDOUT) | |
config.logger.level = Logger.const_get( | |
ENV['LOG_LEVEL'] ? ENV['LOG_LEVEL'].upcase : 'DEBUG' | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'bundler/setup' | |
server "some-ip", :web, :app, :db, primary: true | |
default_run_options[:pty] = true | |
ssh_options[:forward_agent] = true | |
set :application, "application-name" | |
set :repository, "git@git" | |
set :user, "deploy" # As defined on your server |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# You may add here your | |
# server { | |
# ... | |
# } | |
# statements for each of your virtual hosts to this file | |
## | |
# You should look at the following URL's in order to grasp a solid understanding | |
# of Nginx configuration files in order to fully unleash the power of Nginx. | |
# http://wiki.nginx.org/Pitfalls |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
user deploy; | |
worker_processes 1; | |
pid /var/run/nginx.pid; | |
events { | |
worker_connections 768; | |
# multi_accept on; | |
} | |
http { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo "gem: --no-ri --no-rdoc" > ~/.gemrc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# gem install redcarpet | |
# config/initializers/redcarpet.rb | |
# {viewname}.html.md | |
module ActionView | |
class Template | |
module Handlers | |
class Markdown | |
class_attribute :default_format | |
self.default_format = Mime::HTML |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# config/initializers/redcarpet.rb | |
module ActionView | |
class Template | |
module Handlers | |
class Markdown | |
class_attribute :default_format | |
self.default_format = Mime::HTML | |
def call(template) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
user www-data; | |
worker_processes 1; | |
worker_rlimit_nofile 10000; | |
daemon off; | |
pid /run/nginx.pid; | |
events { | |
worker_connections 1024; | |
# multi_accept on; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"flag" | |
"fmt" | |
"log" | |
"net/http" | |
"github.com/bmizerany/pat" | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ bundle exec rackup -p 3003 | |
22:47:02 - INFO - Using Guardfile at /root/calculator-widget/dev/Guardfile. | |
22:47:04 - INFO - Guard is using TerminalTitle to send notifications. | |
22:47:04 - INFO - Starting CSS Builder | |
22:47:04 - INFO - Building CSS | |
22:47:11 - INFO - Starting JS Builder | |
22:47:11 - INFO - Building JS | |
22:47:11 - INFO - Guard is now watching at '/root/' | |
[1] guard(main)> [2014-09-11 22:47:12] INFO WEBrick 1.3.1 | |
[2014-09-11 22:47:12] INFO ruby 1.9.3 (2014-09-03) [java] |
OlderNewer