rails new ror-app-name --api
This step is for creating a very basic level of model for us to work in. If you know already, or wish to apply your own custom models with relationships you can skip this step.
rails new ror-app-name --api
This step is for creating a very basic level of model for us to work in. If you know already, or wish to apply your own custom models with relationships you can skip this step.
Steps to get Rails 4 saving its output to Syslog via Rsyslog. This assumes you are on CentOS
, but should be pretty adaptable to any other distribution. Ruby 2.0+
is also required.
lograge
and logstash-event
to your Gemfile
. Feel free to remove from production
if you'd like to test it in development
as well or something.production.rb
with the lograge
settings and set the logger
to Syslog::Logger
.conf
files to /etc/rsyslog.d/
. /etc/rsyslog.conf
should have $IncludeConfig /etc/rsyslog.d/*.conf
enabled, so it will load any additional configs from /etc/rsyslog.conf
.require 'mina/bundler' | |
require 'mina/rails' | |
require 'mina/git' | |
# require 'mina/rbenv' # for rbenv support. (http://rbenv.org) | |
require 'mina/rvm' # for rvm support. (http://rvm.io) | |
require 'mina/puma' | |
require 'mina/nginx' | |
# Basic settings: |
// This will open up a prompt for text to send to a console session on digital ocean | |
// Useful for long passwords | |
(function () { | |
window.sendString = function (str) { | |
f(str.split("")); | |
function f(t) { | |
var character = t.shift(); | |
var i=[]; | |
var code = character.charCodeAt(); | |
var needs_shift = character.match(/[A-Z!@#$%^&*()_+{}:\"<>?~|]/); |
# config/initializers/compression.rb | |
Rails.application.configure do | |
# Use environment names or environment variables: | |
# break unless Rails.env.production? | |
break unless ENV['ENABLE_COMPRESSION'] == '1' | |
# Strip all comments from JavaScript files, even copyright notices. | |
# By doing so, you are legally required to acknowledge | |
# the use of the software somewhere in your Web site or app: |
$.rails.allowAction = (link) -> | |
if link.data('confirm') | |
$.rails.showConfirmationDialog(link) | |
false | |
else | |
true | |
# User click confirm button | |
$.rails.confirmed = (link) -> | |
link.data('confirm', null) |