Skip to content

Instantly share code, notes, and snippets.

View vicmaster's full-sized avatar

Victor Velazquez vicmaster

View GitHub Profile
module ActionController
class Base
def self.protect_from_forgery; end
def self.before_filter(args); end
def self.layout(args); end
end
end
RSpec.configure do |config|
config.mock_with :rr
@vicmaster
vicmaster / frontend_developer.md
Last active August 29, 2015 13:59
Frontend Developer Skilss

#Front end developer

##Previous experience

  • Understands key server-side web development concepts through experiences such as:
  • Interpreting graphic visual or interaction designs in HTML, CSS and Javascript.
  • Creating visually appealing web pages or interfaces.
  • Creating, editing or modifying templates for a CMS or web development framework.
  • Programming interaction with JavaScript and/or a library such as jQuery, YUI or Prototype.
  • Testing cross-browser, cross-platform, and/or cross-device compatibility for inconsistencies.
@vicmaster
vicmaster / code-of-ethics.md
Created June 12, 2014 15:59
Code of Ethics

Never forget this

Code of Ethics

  • Always communicate. Always be online on Slack.
  • Always work with a Pull Request. Long running PRs are welcome but mark them with [WIP] so we don't merge it.
  • Follow the git flow principles.
  • We always work with a Milestone. See the current milestone here https://github.com/organization/project/issues/milestones link changed purposely
  • Don't hesitate to review other people's work. Always welcome criticism.
@vicmaster
vicmaster / Capybara cheat sheet
Created July 10, 2014 17:50
Capybara cheat sheet
=Navigating=
visit('/projects')
visit(post_comments_path(post))
=Clicking links and buttons=
click_link('id-of-link')
click_link('Link Text')
click_button('Save')
click('Link Text') # Click either a link or a button
click('Button Value')
@vicmaster
vicmaster / hidden_features_of_ruby.md
Last active August 29, 2015 14:04
Hidden features of Ruby you may not know about

How well do you know the language you're using? What if I tell you that even you use it the whole day and every day it still can hide some tricks that you might not be aware of? I'd like to reveal some less or more known, but certainly interesting parts of Ruby to make you sure that you don't miss anything.

Disclaimer

Every example was run with:

→ ruby -v
ruby 2.1.2p95 (2014-05-08 revision 45877) [x86_64-darwin13.0]
and

Update a specific source (and all gems associated with it)

$ bundle update --source=SOURCE

The name of a :git or :path source used in the Gemfile. For instance, with a :git source of http://github.com/rails/rails.git, you would call bundle update --source rails.

For example if you want to update from local source

$ bundle update --source=:path

@vicmaster
vicmaster / code-review.md
Created July 29, 2014 09:19
Code Review

Code Review

A guide for reviewing code and having your code reviewed.

Everyone

  • Accept that many programming decisions are opinions. Discuss tradeoffs, which you prefer, and reach a resolution quickly.
@vicmaster
vicmaster / ecommerce-cheat-sheet.md
Last active May 14, 2020 14:29
eCommerce cheat sheet

Abandonment Rate:

Shopping cart abandonment is a term frequently used in the ecommerce world. Shopping cart abandonment (a.k.a cart abandonment) refers to the issue when the digital customer adds the desired product to the virtual shopping cart and leaves the digital property before completing the purchase. The abandonment rate is the ratio of the total number of abandoned shopping carts to the number of total initiated cart transactions. The metric is used to measure the performance of the digital shopping cart. A typical abandonment rate varies from 60-85%.

Abandonment Rate = Total number of abandoned carts / Total number of cart transactions

Acquisition:

@vicmaster
vicmaster / gist:61377bc3806ae4d8283f
Last active August 29, 2015 14:13
Mocking Github Omniauth

The mock_auth configuration allows you to set per-provider (or default) authentication hashes to return during integration testing. You can set it like so:

module Omniauth

  module Mock
    def auth_mock
      OmniAuth.config.mock_auth[:github] = OmniAuth::AuthHash.new({
        provider: 'github',
 uid: '123545',
@vicmaster
vicmaster / gist:bd3e84fd55d0fb3f60d3
Last active August 29, 2015 14:13
Mocking Gmail Omniauth

The mock_auth configuration allows you to set per-provider (or default) authentication hashes to return during integration testing. You can set it like so:

  OmniAuth.configure do |config|
    config.test_mode = true
    config.add_mock(:default, {
      :info => {
                  :email => 'foobar@crowdint.com',
                  :name => 'foo',
 :password => 'qwerty123',