Skip to content

Instantly share code, notes, and snippets.

View antoniosmgatto's full-sized avatar
🏠
Working from home

Antonio Gatto antoniosmgatto

🏠
Working from home
View GitHub Profile
@antoniosmgatto
antoniosmgatto / docker.md
Last active September 6, 2018 14:03
Comandos Docker

Docker - Comandos Úteis

remove imagens/containers locais

docker-compose down -v --rmi=local --remove-orphans

sobre os containers recriando as imagens e containers

docker-compose up --build --force-recreate

# create a new express app
express clubeincentivo-api -v pug
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum. Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lor
@antoniosmgatto
antoniosmgatto / postgres.md
Last active October 25, 2021 13:11
postgres comands

Postgres tips

DML = Data Manipulation language (INSERT, UPDATE, DELETE and SELECT) DDL = Data definition Language (CREATE, ALTER, DROP)

smallserial, serial and bigserial columns are autoincrement

psql commands

Show roles: \du

\set PROMPT1 '%M:%[%033[1;31m%]%>%[%033[0m%] %n@%/%R%#%x '
\set ON_ERROR_ROLLBACK interactive
\set COMP_KEYWORD_CASE upper
\set HISTFILE ~/.psql/history- :DBNAME
\timing
\x auto
\pset pager off
\pset null '(null)'

String

In this introductory challenge, your task is to use each of the above three methods to return the text Hello World and others!

def single_quote
  # single quote string here
    'Hello World and others!'
end
@antoniosmgatto
antoniosmgatto / Capfile
Last active June 7, 2021 22:17
rails + postgres + sidekiq + capistrado
require "capistrano/setup"
require "capistrano/deploy"
require "capistrano/bundler"
require "capistrano/scm/git"
require "capistrano/rails/assets"
require "capistrano/rails/migrations"
require "capistrano/data_migrate"
require "capistrano/rbenv"