Skip to content

Instantly share code, notes, and snippets.

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

Diego Novais dnovais

🏠
Working from home
View GitHub Profile
@dnovais
dnovais / bash_to_zsh_history.sh
Created July 9, 2024 17:28 — forked from wgirhad/bash_to_zsh_history.sh
Import bash history to zsh history
cat ~/.bash_history | awk '{print ": '`date +%s`':0;" $0}' >> ~/.zsh_history
@dnovais
dnovais / oop.rb
Created February 10, 2023 14:18 — forked from serradura/oop.rb
Código produzido na live "A verdadeira Orientação a Objetos" em 09/02/2023
####################################
# Pilares da Orientação a Objetos: #
####################################
# 👍 Abstração. | >
# 👍 Encapsulamento | > > Composição 🙌
# 👍 Polimorfismo | >
# 👎 Herança
@dnovais
dnovais / postgres-brew.md
Created August 11, 2022 03:11 — forked from ibraheem4/postgres-brew.md
Installing Postgres via Brew (OSX)

Installing Postgres via Brew

Pre-Reqs

Brew Package Manager

In your command-line run the following commands:

  1. brew doctor
  2. brew update
@dnovais
dnovais / git-update-fork.sh
Created August 25, 2021 21:04 — forked from rdeavila/git-update-fork.sh
Git: como atualizar um fork com as mudanças do original?
#!/bin/bash
# Adicione um novo remote; pode chamá-lo de "upstream":
git remote add upstream https://github.com/usuario/projeto.git
# Obtenha todos os branches deste novo remote,
# como o upstream/master por exemplo:
git fetch upstream
@dnovais
dnovais / postgresql_configuration_on_ubuntu_for_rails.md
Created June 25, 2020 00:34 — forked from p1nox/postgresql_configuration_on_ubuntu_for_rails.md
PostgreSQL configuration without password on Ubuntu for Rails

Abstract

You could have postgre installed on localhost with password (or without user or password seted after instalation) but if we are developing we really don't need password, so configuring postgre server without password for all your rails project is usefull.

Install Postgre packages

  • postgresql
  • postgresql-client
  • libpq-dev
@dnovais
dnovais / dokku-digitalocean.md
Created August 27, 2019 01:57 — forked from aurelioluiz/dokku-digitalocean.md
Aplicação Rails com Dokku na DigitalOcean

Aplicação Rails com Dokku na DigitalOcean

Etapas para configuração de uma aplicação em Rails na DigitalOcean usando o Dokku para deploy. A documentação completa está disponível em http://dokku.viewdocs.io/dokku/getting-started/installation

Requisitos

  • DigitalOcean droplet Ubuntu 18.04
  • Dokku 1-click installation
  • Aplicação Rails no GitHub
@dnovais
dnovais / installing_rmagick_ubuntu_16.04.txt
Created August 24, 2018 21:48 — forked from ryderstorm/installing_rmagick_ubuntu_16.04.txt
Installing rmagick gem on Ubuntu 16.04
# the instructions from here: https://stackoverflow.com/questions/3704919/installing-rmagick-on-ubuntu/31089915#31089915
# worked, but only after I added in line 8
sudo apt-get purge graphicsmagick graphicsmagick-dbg imagemagick-common imagemagick imagemagick-6.q16 libmagickcore-6-headers libmagickwand-dev graphicsmagick-libmagick-dev-compat
sudo apt-get autoremove
sudo apt-get install imagemagick libmagickwand-dev
sudo ln -s /usr/lib/x86_64-linux-gnu/ImageMagick-6.8.9/bin-Q16/Magick-config /usr/bin/Magick-config
export PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig
gem install rmagick