Skip to content

Instantly share code, notes, and snippets.

View ivobenedito's full-sized avatar

Ivo Benedito ivobenedito

View GitHub Profile

Keybase proof

I hereby claim:

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

To claim this, I am signing this object:

#!/bin/sh
# Exit if any subcommand fails
set -e
USER=<INSERT_USER_HERE>
PASSWORD=<INSERT_PASSWORD_HERE>
HOST=<INSERT_HOST_HERE>
EXCLUDED_TABLES='(table1|table2|table3)'
DB_NAME=<INSERT_DB_NAME_HERE>
@ivobenedito
ivobenedito / gist:315dbac98a5b6a03c4561d34c1c545d6
Created July 21, 2016 10:29 — forked from keit/gist:6288233
Rails4 + Bower + Bootstrap set-up
This document is outdated.
You should read David Bryant Copeland's excellent online book: http://angular-rails.com/crud_recipe.html
---------------------------------------------------------------------------------------------------------------
I think it's better to install javascript/css libraries using Bower rather than gem which is Ruby packager.
1. Install Rails 4 and create a new project.
2. Install bower(Note you need to install node first.)
sudo npm install -g bower
module Trashable
extend ActiveSupport::Concern
included do
default_scope { where(deleted_at: nil) }
end
module ClassMethods
def trashed
unscope(where: :deleted_at).where.not(deleted_at: nil)
class BaseMandrillMailer < ActionMailer::Base
default(
from: ENV.fetch('SUPPORT_EMAIL'),
reply_to: ENV.fetch('SUPPORT_EMAIL')
)
private
def send_mail(email, subject, body)
mail(to: email, subject: subject, body: body, content_type: 'text/html')
@ivobenedito
ivobenedito / invision.md
Last active August 29, 2015 14:17
InVision Workflow

InVision

How to separate projects? Wireframes & Designs should be on different projects (ex: CBRE Wireframes, CBRE Designs).

Choosing the Project

Each different project type has a subset of related skin, viewports & configurations when previewing the screens.