Skip to content

Instantly share code, notes, and snippets.

View roadev's full-sized avatar
🎯
Focusing

Juan Roa roadev

🎯
Focusing
View GitHub Profile
@roadev
roadev / rails_server_output_merit.rb
Created August 1, 2015 05:09
My view doesn't show the corrent amount of earned points - merit gem
Started POST "/solucions" for 127.0.0.1 at 2015-08-01 00:05:47 -0500
ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
Processing by SolucionsController#create as HTML
Parameters: {"utf8"=>"✓", "authenticity_token"=>"S2gf6bbCbA33KY2NNTk3F3lnBcwOFUuk0jJHgKLY3D0=", "solucion"=>{"micropost_id"=>"1", "solucion"=>"This is the content"}, "commit"=>"Crear Solución"}
User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1
/home/jroa/.rvm/gems/ruby-2.2.1/gems/activerecord-4.0.4/lib/active_record/associations/has_many_association.rb:76: warning: circular argument reference - reflection
/home/jroa/.rvm/gems/ruby-2.2.1/gems/activerecord-4.0.4/lib/active_record/associations/has_many_association.rb:80: warning: circular argument reference - reflection
/home/jroa/.rvm/gems/ruby-2.2.1/gems/activerecord-4.0.4/lib/active_record/associations/has_many_association.rb:84: warning: circular argument reference - reflection
/home/j
# Emails are "examples" for security reasons"
Sent mail to email@gmail.com (62.7ms)
Date: Mon, 03 Aug 2015 04:43:59 +0000
From: postmaster@domain.org
To: email@gmail.com
Message-ID: <55bef18f8dbf6_33ff4eacb9e9476ed@268869cd-5732-4ba4-ade9-c53f70250a53.mail>
Subject: Success! You did it.
Mime-Version: 1.0
Content-Type: text/plain;
@roadev
roadev / user.rb
Last active August 29, 2015 14:26 — forked from benoror/user.rb
devise_invitable: Confirm after set password
class User < ActiveRecord::Base
devise :invitable, :database_authenticatable, :registerable, :recoverable,
:rememberable, :confirmable, :validatable, :encryptable
# ...
# devise confirm! method overriden
def confirm!
welcome_message
super
@roadev
roadev / reset.css
Created October 22, 2015 15:31 — forked from marulango/reset.css
Hoja de estilo para eliminar inconsistencias a través de navegadores
/* http://meyerweb.com/eric/tools/css/reset/
v2.0 | 20110126
License: none (public domain)
*/
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
@roadev
roadev / apple-mq.css
Created January 1, 2016 21:08 — forked from AllThingsSmitty/apple-mq.css
iPhone 6/6 Plus and Apple Watch CSS media queries
/* iPhone 6 landscape */
@media only screen and (min-device-width: 375px)
and (max-device-width: 667px)
and (orientation: landscape)
and (-webkit-min-device-pixel-ratio: 2)
{ }
/* iPhone 6 portrait */
@media only screen
and (min-device-width: 375px)
@roadev
roadev / a.md
Created January 19, 2016 04:42 — forked from danharper/a.md
Laravel Queue Supervisor

Install Supervisor with sudo apt-get install supervisor. Ensure it's started with sudo service supervisor restart.

In /etc/supervisord/conf.d/ create a .conf file. In this example, laravel_queue.conf (contents below). Give it execute permissions: chmod +x laravel_queue.conf.

This file points at /usr/local/bin/run_queue.sh, so create that file there. Give this execute permissions, too: chmod +x run_queue.sh.

Now update Supervisor with: sudo supervisorctl reread. And start using those changes with: sudo supervisorctl update.

@roadev
roadev / keybase.md
Created January 22, 2016 17:11
keybase.md

Keybase proof

I hereby claim:

  • I am roadev on github.
  • I am roadev (https://keybase.io/roadev) on keybase.
  • I have a public key ASAfXOThX2pFu8iWyDfwCuTlpKR1t8IYVzPkMrECzXK7Ugo

To claim this, I am signing this object:

@roadev
roadev / bluetooth_serial.md
Last active April 1, 2016 01:57 — forked from 0/bluetooth_serial.md
Connecting a Bluetooth device for serial communication on Arch Linux.

The following are instructions for connecting a Bluetooth device for serial communication on Arch Linux using BlueZ 5.31.

Prerequisites

The following packages are required:

  • bluez: bluetoothd
  • bluez-utils: bluetoothctl, rfcomm
@roadev
roadev / Dockerfile
Created September 19, 2016 01:56
Dockerfile for building magento 1.x development environment
FROM php:5.6-apache
RUN apt-get update && apt-get install -y \
libmcrypt-dev \
libxml2-dev \
libpng12-dev \
libjpeg-dev
RUN docker-php-ext-install mysqli
RUN docker-php-ext-install mcrypt
RUN docker-php-ext-install soap