This file contains hidden or 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
sudo apt-get update -y | |
sudo apt-get upgrade -y | |
# Rvm | |
curl -L https://get.rvm.io | bash -s stable | |
source ~/.rvm/scripts/rvm | |
rvm requirements | |
rvm install 2.5.3 | |
gem install rails |
This file contains hidden or 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
sudo docker build . -t face8 | |
sudo docker run --name face8 -d -p 8081:8081 | |
sudo docker stop face8 | |
sudo docker start face8 | |
sudo docker ps -a | |
sudo docker run -it face8 bash | |
sudo docker exec -it face8 bash |
This file contains hidden or 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
== Funcionando (POSTMAN) | |
D, [2018-11-13T16:47:35.397354 #5848] DEBUG -- : [5f552a92-fdb0-4eec-a9bf-24de2eb7de6c] (0.9ms) COMMIT | |
I, [2018-11-13T16:47:35.403792 #5848] INFO -- : [5f552a92-fdb0-4eec-a9bf-24de2eb7de6c] [active_model_serializers] Rendered VideoSerializer with ActiveModelSerializers::Adapter::Attributes (0.81ms) | |
D, [2018-11-13T16:47:35.415142 #5848] DEBUG -- : [5f552a92-fdb0-4eec-a9bf-24de2eb7de6c] (0.2ms) BEGIN | |
D, [2018-11-13T16:47:35.417026 #5848] DEBUG -- : [5f552a92-fdb0-4eec-a9bf-24de2eb7de6c] User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT $2 [["id", 1], ["LIMIT", 1]] | |
D, [2018-11-13T16:47:35.418859 #5848] DEBUG -- : [5f552a92-fdb0-4eec-a9bf-24de2eb7de6c] SQL (0.4ms) INSERT INTO "logs" ("request_url", "status", "ip_request", "user_id", "http_method", "data", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["request_url", "https://player.chiligumvideos.com/api/videos"], ["status", "200"], ["ip_request", "170.78. |
This file contains hidden or 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
#! /bin/sh | |
### BEGIN INIT INFO | |
# Provides: nginx | |
# Required-Start: $all | |
# Required-Stop: $all | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: starts the nginx web server | |
# Description: starts nginx using start-stop-daemon |
This file contains hidden or 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
pt: | |
dictionary: | |
actions: &actions 'Ações' | |
api_id: &api_id 'API ID (pegar essa informação no whitelabel)' | |
credentials_link: &credentials 'Credenciais' | |
description: &info 'Descrição' | |
destroy_question: &destroy_question 'Você tem certeza?' | |
docs_link: &docs 'Docs' | |
email: &email 'E-mail' | |
home_link: &home 'Home' |
This file contains hidden or 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
ubuntu@ip-172-31-57-145:~$ gem install chili_player | |
Fetching: chili_player-0.1.2.gem (100%) | |
Successfully installed chili_player-0.1.2 | |
Parsing documentation for chili_player-0.1.2 | |
Installing ri documentation for chili_player-0.1.2 | |
Done installing documentation for chili_player after 0 seconds | |
1 gem installed | |
ubuntu@ip-172-31-57-145:~$ irb |
This file contains hidden or 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
" Use Vim settings, rather then Vi settings (much better!). | |
" This must be first, because it changes other options as a side effect. | |
set nocompatible | |
" ================ General Config ==================== | |
set number "Line numbers are good | |
set backspace=indent,eol,start "Allow backspace in insert mode | |
set history=1000 "Store lots of :cmdline history | |
set showcmd "Show incomplete cmds down the bottom |
This file contains hidden or 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=Btc Price | |
After=network.target | |
[Service] | |
Type=service | |
User=ubuntu | |
WorkingDirectory=/home/ubuntu/btc_price_example | |
ExecStart=/bin/bash -lc 'RAILS_ENV=production bundle exec rake btc:api' | |
Restart=on-failure |
This file contains hidden or 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
class WebNotificationsChannel < ApplicationCable::Channel | |
def subscribed | |
stream_from "web_notifications_channel" | |
end | |
end |
This file contains hidden or 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
<h1> | |
USD <div id="price"></div> | |
</h1> |