Add the following to your bashrc.
#Add another docker window
function dock()
{
if [ "$1" == "-h" ]
then
SELECT table, | |
formatReadableSize(sum(bytes)) as size, | |
min(min_date) as min_date, | |
max(max_date) as max_date | |
FROM system.parts | |
WHERE active | |
GROUP BY table |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8" /> | |
<title>Remote terminal</title> | |
<link rel="stylesheet" href="xterm.css" /> | |
<script src="terminal.class.js"></script> | |
Cheat Sheets are greate but they are not a substitute for learning the framework and reading the documentation as we most certainly have not covered every potential example here. Please refer to the Rails Command Line Docs for more information.
You can get all of this information on the command line.
rails generate
with no generator name will output a list of all available generators and some information about global options.
rails generate GENERATOR --help
will list the options that can be passed to the specified generator.
#! /bin/bash | |
export RUN_AS='ubuntu'; | |
export INSTALL_DIR='/var/www/sentry'; | |
HOSTNAME='http://mysentry.example.com'; # No trailing slash | |
DB_HOST='something.rds.amazonaws.com'; | |
DB_PORT='5432'; | |
DB_USER='sentry'; | |
DB_NAME='sentry'; | |
DB_PASSWORD='DB_PASSWORD'; |
Create the file /etc/apt/sources.list.d/pgdg.list, and add a line for the repository | |
deb http://apt.postgresql.org/pub/repos/apt/ xenial-pgdg main | |
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | \ | |
sudo apt-key add - | |
sudo apt-get update | |
sudo apt-get install postgresql-9.6 postgresql-server-dev-9.6 postgresql-contrib-9.6 -y | |
sudo su - postgres -c "psql template1 -p 5433 -c 'CREATE EXTENSION IF NOT EXISTS hstore;'" |
{ | |
"cells": [ | |
{ | |
"cell_type": "code", | |
"execution_count": 1, | |
"metadata": { | |
"collapsed": false | |
}, | |
"outputs": [ | |
{ |
require_relative 'boot' | |
require 'csv' | |
require 'rails/all' | |
# Require the gems listed in Gemfile, including any gems | |
# you've limited to :test, :development, or :production. | |
Bundler.require(*Rails.groups) | |
module Giant | |
class Application < Rails::Application |