Skip to content

Instantly share code, notes, and snippets.

View jorgeacaballero's full-sized avatar
🎯
Focusing

Jorge Caballero jorgeacaballero

🎯
Focusing
View GitHub Profile
@jorgeacaballero
jorgeacaballero / git-conf.md
Last active August 29, 2015 13:56
Configuración de Git
  1. Primero ir a Github y serciorarse que su SSH key este configurada con su computadora: https://github.com/settings/ssh

  2. Ir a la carpeta pymeSolutions

  3. Configurar su nombre y correo:

$ git config --global user.name "Su Nombre Aqui"
$ git config --global user.email [email]@unitec.edu
@jorgeacaballero
jorgeacaballero / error-fix.md
Created March 2, 2014 21:48
Error de Configuración de Apache

Para arreglar el error de apache con las rutas ir a:

sudo vim /etc/apache2/sites-available/default

aparecera este documento:

<VirtualHost *:80>
        ServerAdmin webmaster@localhost
@jorgeacaballero
jorgeacaballero / seguridad.mkd
Last active August 29, 2015 14:01
Implementación de Seguridad

Seguridad

Este documento tiene como objetivo mostrar el uso del modulo de Seguridad en la aplicación.

La implementación es una combinación de la seguridad de Laravel como la implementación de roles de nuestra parte.

Contenido:

  1. Clase de usuario autenticado Auth::user()
  2. Validación de Roles con Seguridad::accion()

Keybase proof

I hereby claim:

  • I am jorgecaballero on github.
  • I am jorgecaballero (https://keybase.io/jorgecaballero) on keybase.
  • I have a public key whose fingerprint is C778 37BF AE11 D3CF 3A30 6FEB 821E E8EA B934 5BB6

To claim this, I am signing this object:

ActiveAdmin.register Estate, as: "Inmueble", namespace: :provider do
permit_params :name, :price, :kind, :ground_area, :max_period, :common_area, :special_attr, :max_down, :room_number, :capital_gain, :ground_unit, :special_offer, :construction_unit, :construction_area, :city, :address, :gposition, :description, :sold, :new, :project_id, :real_estate_id, images_attributes: [:description, :picture, :id]
scope("All") { |scope| scope.where(real_estate_id: current_provider_user.real_estate_id) } #, default: true
before_build do |record|
record.real_estate_id = current_provider_user.real_estate_id
record.visible = false
end
syntax error, unexpected ',', expecting keyword_end
...rovider_user.real_estate_id) }, default: true
... ^
ActiveAdmin.register Estate, as: "Inmueble", namespace: :provider do
permit_params :name, :price, :kind, :ground_area, :max_period, :common_area, :special_attr, :max_down, :room_number, :capital_gain, :ground_unit, :special_offer, :construction_unit, :construction_area, :city, :address, :gposition, :description, :sold, :new, :project_id, :real_estate_id, images_attributes: [:description, :picture, :id]
scope("All", default: true) { |scope| scope.where(real_estate_id: current_provider_user.real_estate_id) }
before_build do |record|
record.real_estate_id = current_provider_user.real_estate_id
record.visible = false
end
2015-08-31T15:54:04.450394 #1285] INFO -- : Started GET "/" for x.x.x.x at 2015-08-31 15:54:04 -0400
I, [2015-08-31T15:54:04.457939 #1285] INFO -- : Processing by Devise::SessionsController#new as HTML
D, [2015-08-31T15:54:04.461533 #1285] DEBUG -- : Plan Load (0.5ms) SELECT "plans".* FROM "plans" ORDER BY "plans"."id" DESC LIMIT 1
I, [2015-08-31T15:54:04.479932 #1285] INFO -- : Rendered devise/sessions/new.html.erb within layouts/application (16.2ms)
I, [2015-08-31T15:54:04.503950 #1285] INFO -- : Completed 500 Internal Server Error in 46ms
F, [2015-08-31T15:54:04.507037 #1285] FATAL -- :
ActionView::Template::Error (source sequence is illegal/malformed utf-8):
5: <title><%= content_for?(:title) ? yield(:title) : "Title" %></title>
6: <meta name="description" content="<%= content_for?(:description) ? yield(:description) : "Title" %>">
7: <%= stylesheet_link_tag 'application', media: 'all' %>
@jorgeacaballero
jorgeacaballero / trace.log
Created August 31, 2015 20:15
Precompile log
bundle exec rake assets:precompile RAILS_ENV="production" --trace
** Invoke assets:precompile (first_time)
** Invoke assets:environment (first_time)
** Execute assets:environment
** Invoke environment (first_time)
** Execute environment
** Execute assets:precompile
I, [2015-08-31T16:14:21.280373 #1489] INFO -- : Writing /home/rails/client-portal/public/assets/active_admin-d8622bdaf9113ddf7612d53b1135dee0cfce37d0a4d7e786ec70fccdaf4ffe66.css
I, [2015-08-31T16:14:21.455444 #1489] INFO -- : Writing /home/rails/client-portal/public/assets/active_admin/print-87c5ffc1d869a919123bcc1dc5ec51b20bc79fd9aeab9eed77e3438c6acd4f68.css
I, [2015-08-31T16:14:30.768568 #1489] INFO -- : Writing /home/rails/client-portal/public/assets/active_admin-e53082549a923865a9b59d3b3bbfd9c2ed15ee16726dba0adcb7feef15366b83.js
@jorgeacaballero
jorgeacaballero / output
Last active January 27, 2016 15:25
RVM Installation Output
deploy@ubuntu-512mb-nyc2-01:~$ gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
gpg: directory `/home/deploy/.gnupg' created
gpg: new configuration file `/home/deploy/.gnupg/gpg.conf' created
gpg: WARNING: options in `/home/deploy/.gnupg/gpg.conf' are not yet active during this run
gpg: keyring `/home/deploy/.gnupg/secring.gpg' created
gpg: keyring `/home/deploy/.gnupg/pubring.gpg' created
gpg: requesting key D39DC0E3 from hkp server keys.gnupg.net
gpg: /home/deploy/.gnupg/trustdb.gpg: trustdb created
gpg: key D39DC0E3: public key "Michal Papis (RVM signing) <[email protected]>" imported
gpg: no ultimately trusted keys found