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
// Ejemplo de programa que hace operaciones con funciones | |
Inicio | |
Mientras(verdadero) Hacer | |
Imprimir('Que operacion desea realizar?') | |
Imprimir('1. Suma') | |
Imprimir('2. Restar') | |
Imprimir('3. Multiplicar') | |
Imprimir('4. Dividir') | |
operacion = Leer() | |
Si(operacion == 1) Entonces |
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
<!-- Nota número 2: Lo que se debe agregar adentro de las etiquetas <header> --> | |
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous"> | |
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.bundle.min.js" integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM" crossorigin="anonymous"></script> | |
<script src="index.js"></script> |
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
# Parte 1 | |
# El contenido del pie de la tabla, es decir de la etiqueta <tfoot> | |
# Estas 4 lineas se deben copiar de aqui y pegar entre las etiquetas <tfoot> </tfoot> | |
<td><input id="id" type="text" class="form-control"></td> | |
<td><input id="producto" type="text" class="form-control"></td> | |
<td><input id="precio" type="text" class="form-control"></td> | |
<td><button onclick="agregarProducto()" class="btn btn-success">Agregar</button></td> | |
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
[Unit] | |
Description=sidekiq | |
After=syslog.target network.target | |
[Service] | |
Type=simple | |
User=ec2-user | |
Group=ec2-user | |
UMask=0002 | |
WorkingDirectory=/home/ec2-user/production/railsapp/current |
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 'mina/rails' | |
require 'mina/git' | |
require 'mina/rvm' | |
set :application_name, 'railsapp' | |
set :domain, '255.255.255.255' | |
set :deploy_to, '/home/ec2-user/production/railsapp' | |
set :repository, 'git@github.com:company/railsapp.git' | |
set :branch, 'main' | |
set :user, 'ec2-user' |
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
rails_env = "production" | |
environment rails_env | |
app_dir = File.expand_path("../../..", __FILE__) | |
bind "unix://#{app_dir}/puma.sock" | |
pidfile "#{app_dir}/puma.pid" | |
state_path "#{app_dir}/puma.state" | |
directory "#{app_dir}" |
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
[Unit] | |
Description=Puma | |
After=network.target | |
[Service] | |
Type=forking | |
User=ec2-user | |
Environment=RAILS_ENV=production | |
WorkingDirectory=/home/ec2-user/production/railapp/current |
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
upstream rails { | |
server unix:///home/ec2-user/production/railsapp/current/puma.sock fail_timeout=0; | |
} | |
server { | |
server_name _; | |
root /home/ec2-user/production/railsapp/current/public; | |
location / { |
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
[Unit] | |
Description=sidekiq | |
After=syslog.target network.target | |
[Service] | |
Type=simple | |
User=ubuntu | |
Group=ubuntu | |
UMask=0002 | |
WorkingDirectory=/path/to/rails |
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
upstream app { | |
server unix:///path/to/rails/puma.sock fail_timeout=0; | |
} | |
server { | |
server_name 1.2.3.4 www.myrailsapp.com; | |
root /path/to/rails/public; | |
location ^~ /assets/ { | |
gzip_static on; |
NewerOlder