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 / 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
@dnovais
dnovais / disable_ipv6.md
Created November 13, 2018 17:31
Disable IPV6

IPV6 is the most recent version of internet protocol (IP) designed to eliminate the long-anticipated address exhaustion problem of IPV4. In order to disable IPV6 on Linux/Ubuntu, please follow the steps below:

1 Open Terminal

2 Enter gksudo gedit /etc/sysctl.conf and open the configuration file and add the following lines at the end

net.ipv6.conf.all.disable_ipv6 = 1

net.ipv6.conf.default.disable_ipv6 = 1

@dnovais
dnovais / remove_all_gems_rbenv.md
Created December 11, 2018 14:27
Rbenv - Remove all gems from environment

$ mkdir -p ~/.rbenv/plugins # create the plugins dir if you haven't already $ git clone https://github.com/jbernsie/rbenv-clean ~/.rbenv/plugins/rbenv-clean

Uninstall all non-default gems in Ruby 2.5.1 and leave every other version un-touched

$ rbenv clean -v 2.5.1 Uninstall all non-default gems in the current global version

$ rbenv clean -c Nuke the entire environment

@dnovais
dnovais / fix_brew_macos.md
Last active December 13, 2018 11:39
Fix brew problems - MacOs
  • brew doctor
  • brew upgrade
  • brew cleanup
@dnovais
dnovais / fix_rmagick_problem_mac.md
Created January 11, 2019 10:56
Fix problem with rmagick on Mac Os
  • brew unlink imagemagick
  • brew install imagemagick@6 && brew link imagemagick@6 --force
  • echo 'export PATH="/usr/local/opt/imagemagick@6/bin:$PATH"' >> ~/.bash_profile
@dnovais
dnovais / fix_error_cant_find_gem_bundler.md
Created January 11, 2019 13:43
Fix error can't find gem bundler
  • can't find gem bundler
  • gem install bundler -v '~> 1.17.1'
@dnovais
dnovais / overview_mongodb.md
Created May 8, 2019 20:14
Overview a respeito do MongoDB

Um overview a respeito do MongoDB

  • Um banco de dados não relacional;
  • Sem o uso de SQL (No SQL);
  • A sintax é diferente;
  • De alto desempenho;
  • Sem migrates;
  • Não existe schema;

O termo NOSQL surgiu por Carlo Strozzi em 1998 e depois veio a resurgir em 2009 com Eric Evans.

@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 / fix-error-cant-find-bundler.md
Created March 30, 2020 13:21
Fixing the error: can't find gem bundler (>= 0.a)

Corrigindo o erro: can't find gem bundler (>= 0.a)

Para corrigir o erro basta instalar a gem bundler pegando a versão especifica que contem no Gemfile.lock

gem install bundler -v "$(grep -A 1 "BUNDLED WITH" Gemfile.lock | tail -n 1)"
@dnovais
dnovais / oh-my-zsh-insecure-completion-dependent.md
Last active March 30, 2020 14:15
Fixing error: oh-my-zsh Insecure completion-dependent

Corrigindo o erro de segurança do oh-my-zsh:

  • "oh-my-zsh Insecure completion-dependent directories detected"

Basta rodar os comandos:

sudo chmod g-w /usr/local/share/zsh /usr/local/share/zsh/site-functions
sudo chmod o-w /usr/local/share/zsh /usr/local/share/zsh/site-functions