Skip to content

Instantly share code, notes, and snippets.

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

Paulo Cesar cheesepaulo

🏠
Working from home
View GitHub Profile
<% flash.each do |type, message| %>
<% if type == 'success' || type == 'notice' %>
<script type="text/javascript">
$(function(){
PNotify.success({
text: "<%= message %>",
delay: 3000,
styling: 'bootstrap4'
});
});
group :test do
gem 'selenium-webdriver', '~> 3.0'
end
# Capybara config with docker-compose environment vars
Capybara.app_host = "http://#{ENV['TEST_APP_HOST']}:#{ENV['TEST_PORT']}"
Capybara.default_driver = :selenium
Capybara.javascript_driver = :selenium
Capybara.run_server = false
# Configure the Chrome driver capabilities & register
args = ['--no-default-browser-check', '--start-maximized']
caps = Selenium::WebDriver::Remote::Capabilities.chrome("chromeOptions" => {"args" => args})
Capybara.register_driver :selenium do |app|
@cheesepaulo
cheesepaulo / docker-compose.yml
Created June 22, 2018 22:18
selenium-docker-compose
version: '3.6'
services:
db:
image: 'postgres:9.5'
volumes:
- 'postgres:/var/lib/postgresql/data'
app:
depends_on:
@cheesepaulo
cheesepaulo / multiple_belongs_to.rb
Last active March 27, 2018 14:45
multiple belongs_to has_one
Trip >
belongs_to :origin, class_name: 'City'
belongs_to :destiny, class_name: 'City'
City >
has_many :origins, class_name: 'Trip', foreign_key: 'origin_id'
has_many :destinys, class_name: 'Trip', foreign_key: 'destiny_id'
Migration >
@cheesepaulo
cheesepaulo / README.markdown
Created October 17, 2017 23:40 — forked from FranklinYu/README.markdown
links for old versions of Docker for Mac (inspired by docker/for-mac#1120)

links for old versions of Docker for Mac

Note:

  • Old versions are not supported by the Docker team!
  • This Gist may be removed if Docker officially provides such listing.

Edge channel:

#
# Spaceship ZSH Theme
#
# Author: Denys Dovhan, denysdovhan.com
# License: MIT
# https://github.com/denysdovhan/spaceship-zsh-theme
# ------------------------------------------------------------------------------
# CONFIGURATION
# The default configuration that can be overridden in .zshrc
@cheesepaulo
cheesepaulo / package.json
Created October 1, 2017 13:11
task-manager-angular
{
"name": "taskmanager-frontend",
"version": "0.0.0",
"license": "MIT",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
#atom sync packages
@cheesepaulo
cheesepaulo / cloudSettings
Last active May 26, 2021 23:13
Visual Studio Code Settings Sync Gist
{"lastUpload":"2021-05-26T23:13:34.705Z","extensionVersion":"v3.4.3"}