Skip to content

Instantly share code, notes, and snippets.

Avatar

Marcio de Jesus marciojg

View GitHub Profile
View cloudSettings
{"lastUpload":"2020-08-01T13:05:52.907Z","extensionVersion":"v3.4.3"}
@marciojg
marciojg / Guia rápido de instalação do WSL2 + Docker.md
Last active Jul 29, 2020 — forked from argentinaluiz/Guia rápido de instalação do WSL2 + Docker.md
Startup DEV WINDOWS/LINUX - Guia rápido de instalação do WSL2 + Docker
View Guia rápido de instalação do WSL2 + Docker.md

Startup DEV WINDOWS/LINUX - Guia rápido de instalação do WSL2 + Docker

INSTRUCÃO OFICIAL: https://docs.microsoft.com/pt-br/windows/wsl/install-win10

Em 2016, a Microsoft anunciou a possibilidade de rodar o Linux dentro do Windows 10 como um subsistema e o nome a isto foi dado de WSL ou Windows Subsystem for Linux.

O acesso ao sistema de arquivos no Windows 10 pelo Linux era simples e rápido, porém não tinhamos uma execução completa do kernel do Linux e outros artefatos nativos e isto impossibilitava a execução de várias tarefas no Linux, uma delas é o Docker.

Em 2019, a Microsoft anunciou o WSL2, com uma dinâmica aprimorada em relação a 1ª versão:

@marciojg
marciojg / rspec_helper_example.md
Created Jan 19, 2020 — forked from HeroicEric/rspec_helper_example.md
An example of how to create a RSpec test helper
View rspec_helper_example.md

RSpec Helper Example

Here's an example of a rspec test helper that will let you sign in as a given user.

Create spec/support/helpers/authentication.rb with the following:

module Helpers
  module Authentication
    def sign_in_as(user)
@marciojg
marciojg / rspec_model_testing_template.rb
Created Jan 19, 2020 — forked from kyletcarlson/rspec_model_testing_template.rb
Rails Rspec model testing skeleton & cheat sheet using rspec-rails, shoulda-matchers, shoulda-callbacks, and factory_girl_rails. Pretty much a brain dump of examples of what you can (should?) test in a model. Pick & choose what you like, and please let me know if there are any errors or new/changed features out there. Reddit comment thread: http…
View rspec_model_testing_template.rb
# This is a skeleton for testing models including examples of validations, callbacks,
# scopes, instance & class methods, associations, and more.
# Pick and choose what you want, as all models don't NEED to be tested at this depth.
#
# I'm always eager to hear new tips & suggestions as I'm still new to testing,
# so if you have any, please share!
#
# @kyletcarlson
#
# This skeleton also assumes you're using the following gems:
@marciojg
marciojg / webpacker_rails.md
Created Jan 18, 2020 — forked from maxivak/webpacker_rails.md
Webpack, Yarn, Npm in Rails
View webpacker_rails.md
@marciojg
marciojg / mysql.database.yml
Created Jan 18, 2020 — forked from jwo/mysql.database.yml
Sample config/database.yml from Rails. Postgres, MySQL, and SQLite
View mysql.database.yml
#
# Install the MYSQL driver
# gem install mysql2
#
# Ensure the MySQL gem is defined in your Gemfile
# gem 'mysql2'
#
# And be sure to use new-style password hashing:
# http://dev.mysql.com/doc/refman/5.0/en/old-client.html
development:
View remover_deferred.rb
# frozen_string_literal: true
begin
require "bundler/inline"
rescue LoadError => e
$stderr.puts "Bundler version 1.10 or later is required. Please update your Bundler"
raise e
end
gemfile(true) do
View incoherent_validation_with_nested_attributes_for_belongs_to_association.rb
# frozen_string_literal: true
begin
require "bundler/inline"
rescue LoadError => e
$stderr.puts "Bundler version 1.10 or later is required. Please update your Bundler"
raise e
end
gemfile(true) do
You can’t perform that action at this time.