Skip to content

Instantly share code, notes, and snippets.

View americac's full-sized avatar

America Calleros americac

View GitHub Profile
@americac
americac / spacemacs-keybindings.md
Created July 23, 2021 22:39 — forked from rnwolf/spacemacs-keybindings.md
spacemacs keybindings that i need to learn

Definitions

Done

  • PR has been approved and merged
  • PR has been tested/QA'd
  • No bugs found

Ready

  • Points have to be estimated, as a team
  • Exceptions might be smaller stories that are very simple
@americac
americac / gist:062250301b853e837bd8558f4f64cb13
Created April 9, 2018 14:33 — forked from ssunday/gist:928aa2105ad623f45586a0f0b3c19064
Send dead letter messages back to SQS queue
1. Set Dead letter queue's dead letter queue to the main queue you want to send messages from
2. Set max receives to 1
3. View messages/start polling for messages in dead letter queue
4. Verify messages have been sent to other queue and stop the redrive policy on the dead letter queue.

Rails naming conventions

General Ruby conventions

Class names are CamelCase.

Methods and variables are snake_case.

Methods with a ? suffix will return a boolean.

@americac
americac / api_controller.rb
Created November 13, 2017 16:19 — forked from dnlserrano/api_controller.rb
Custom Authentication Controllers
class ApiController < ApplicationController
# define which model will act as token authenticatable
acts_as_token_authentication_handler_for Login
# Prevent CSRF attacks by raising an exception.
# For APIs, you may want to use :null_session instead.
protect_from_forgery with: :null_session
respond_to :json
skip_before_filter :verify_authenticity_token, if: :json_request?
@americac
americac / rails http status codes
Created September 30, 2017 02:08 — forked from mlanett/rails http status codes
HTTP status code symbols for Rails
HTTP status code symbols for Rails
Thanks to Cody Fauser for this list of HTTP responce codes and their Ruby on Rails symbol mappings.
Status Code Symbol
1xx Informational
100 :continue
101 :switching_protocols
102 :processing
@americac
americac / capybara cheat sheet
Created September 1, 2017 22:50 — forked from zhengjia/capybara cheat sheet
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')