Skip to content

Instantly share code, notes, and snippets.

View rbrto's full-sized avatar

Roberto Esparza rbrto

View GitHub Profile
alias sqldev="xhost +local:docker && docker run -d -e DISPLAY=unix$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix -v $PWD/docker-data/sqldeveloper:/data gitech/sqldeveloper"
@rbrto
rbrto / gist:2cd177514e73ec9b9488
Created March 27, 2016 15:38
Docker laravel 5 mysql
http://www.sitepoint.com/docker-and-dockerfiles-made-easy/
@rbrto
rbrto / Arquitectura REST JAVA ANGULARJS
Last active April 1, 2016 01:53
Arquitectura REST JAVA ANGULARJS
http://blog.jhades.org/developing-a-modern-java-8-web-app-with-spring-mvc-and-angularjs/
http://g00glen00b.be/spring-data-angular/

Conectar BD del Contenedor Docker dentro de Vagrant desde RubyMine

Ejecutar dentro de la carpeta vagrant comando vagrant ssh-config

muestra las opciones para poder acceder a vagrant por ssh , los datos que interesan son:

HostName: 127.0.0.1

User: vagrant

@rbrto
rbrto / rspec_model_testing_template.rb
Created December 14, 2016 16:58 — forked from SabretWoW/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…
# 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:
require 'rails_helper'
RSpec.describe TodosController, :type => :controller do
context "GET index" do
#context "POST create" do
#context "GET show" do
#context "PATCH update" do (or PUT update)
#context "DELETE destroy" do
#context "GET new" do
@rbrto
rbrto / capybara.md
Created December 14, 2016 17:01 — forked from steveclarke/capybara.md
RSpec Matchers

Capybara

save_and_open_page

Matchers

have_button(locator)
@rbrto
rbrto / doc.md
Created December 24, 2016 00:32 — forked from oelmekki/doc.md
Rails + Browserify + React + es7

1. Gemfile

gem 'browserify-rails', '1.5.0' # until fix: https://github.com/browserify-rails/browserify-rails/issues/101
gem 'react-rails'

Browserify-rails allows to use browserify within assets pipeline. React-rails is here only to allow to use #react_component (and thus, prerendering).

Note that jquery-rails can be removed from Gemfile, the npm version of jquery and jquery-ujs will be used instead.

@rbrto
rbrto / load_test_data.sh
Created December 31, 2016 00:49 — forked from clintongormley/load_test_data.sh
Run these commands in your shell to setup the test data for Chapter 5
curl -XPUT 'http://localhost:9200/us/user/1?pretty=1' -d '
{
"email" : "john@smith.com",
"name" : "John Smith",
"username" : "@john"
}
'
curl -XPUT 'http://localhost:9200/gb/user/2?pretty=1' -d '
{
@rbrto
rbrto / gist:c20bfbe1f0865c90cdeec6449d267e0a
Created January 11, 2017 14:27 — forked from kinopyo/gist:2343176
Override Devise RegistrationsController, override redirect path after updating user

Override Devise RegistrationsController

Overview

Here I'll show you

  • How to override devise registrations_controller(related to create/update user account)
  • How to change redirect path after updating user

Override RegistrationsController