Skip to content

Instantly share code, notes, and snippets.

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

Diego Noronha gitDbits

🏠
Working from home
View GitHub Profile
@gitDbits
gitDbits / Default Terminal Linux
Last active November 3, 2020 20:57
Set Default Terminal Linux
gsettings set org.gnome.desktop.default-applications.terminal exec 'konsole'
@gitDbits
gitDbits / Install PhantomJS
Last active November 3, 2020 20:58
Phantom JS for SGPP
# How to install PhantomJS on Ubuntu
Version: `1.9.8`
Platform: `x86_64`
First, install or update to the latest system software.
sudo apt-get update
sudo apt-get install build-essential chrpath libssl-dev libxft-dev
begin
@lesson = Lesson.find(params[:id]) if current_user
@lesson = Lesson.by_teacher(current_teacher).find(params[:id]) if current_teacher
rescue ActiveRecord::RecordNotFound => e
redirect_to lessons_path, flash: { warning: "Impossible localized record" }
end
*.rbc
capybara-*.html
.rspec
/db/*.sqlite3
/db/*.sqlite3-journal
/db/*.sqlite3-[0-9]*
/public/system
/coverage/
/spec/tmp
*.orig
@gitDbits
gitDbits / Docker
Created August 6, 2021 16:55
Annotations docker
# run Dockerfile local
docker build -f Dockerfile -t grubber_m4u .
@gitDbits
gitDbits / command_database_rails .txt
Last active September 9, 2021 15:07
commands database Rails
Usual commands:
db:create - Cria o banco de dados para o ambiente corrente (development, test ou production).
db:drop - Exclui o banco de dados para o ambiente corrente (development, test ou production).
db:migrate - Roda as migrations para o ambiente corrente.
db:rollback - Desfaz o último arquivo de migration.
@gitDbits
gitDbits / http_status_code_ruby.txt
Created October 27, 2021 17:26
HTTP Status code symbol ruby
HTTP status code symbols for Rails
Thanks to Cody Fauser for this list of HTTP responce codes and their Ruby on Rails symbol mappings.
Status Code Symbol
1xx Informational
100 :continue
101 :switching_protocols
102 :processing