Skip to content

Instantly share code, notes, and snippets.

View dbarria's full-sized avatar
🏠
Working from home

Daniel Barria dbarria

🏠
Working from home
View GitHub Profile
@dbarria
dbarria / index.html
Last active May 13, 2020 21:37 — forked from pdaire/index.html
bci demo salesforce
<html>
<head></head>
<body>
<h1>Widget Let's Talk</h1>
<script type='text/javascript' async defer>
(function(l,t){if(l.$LT)return;function ls(){a=!1;s=t.createElement('script');s.type='text/javascript';s.src='https://bcitransaccional.letsta.lk/widget.js';s.async=!0;s.defer=!0;k=document.getElementsByTagName('script')[0];k.parentNode.insertBefore(s,k)};var lt=l.$LT=function(callback){if(typeof callback==='function'){mock.initCallBack=callback}};lt.enqueue=function(){mock.stack.push(arguments);mock.times.push(+new Date)};lt.settings=function(settings){lt.enqueue('userSettings',settings)};lt.chatMetadata=function(getMetadata){if(typeof getMetadata==='function'){lt.enqueue('metadata',getMetadata())}};lt.setByName=function(name){mock.name=name};var mock=lt._={name:!1,initCallBack:!1,stack:[],times:[+new Date],};if(t.body){ls()}else{if(l.attachEvent){l.attachEvent('onload',ls)}else{l.addEventListener('load',ls,!1)}}})(window,document);window.$LT(function(messenger){messenger.setByName('salesforce');});
</
require 'rails_helper'
RSpec.describe TodosController, :type => :controller do
describe "GET #index" do
#describe "POST #create" do
#describe "GET #show" do
#describe "PATCH #update" do (or PUT #update)
#describe "DELETE #destroy" do
#describe "GET #new" do
@dbarria
dbarria / rspec_model_testing_template.rb
Created July 25, 2017 15:53 — forked from SabretWoW/rspec_model_testing_template.rb
Rails Rspec model testing skeleton & cheat sheet using rspec-rails, shoulda-matchers, shoulda-callbacks, and factory_girl_rails. Pretty much a brain dump of examples of what you can (should?) test in a model. Pick & choose what you like, and please let me know if there are any errors or new/changed features out there. Reddit comment thread: http…
# This is a skeleton for testing models including examples of validations, callbacks,
# scopes, instance & class methods, associations, and more.
# Pick and choose what you want, as all models don't NEED to be tested at this depth.
#
# I'm always eager to hear new tips & suggestions as I'm still new to testing,
# so if you have any, please share!
#
# @kyletcarlson
#
# This skeleton also assumes you're using the following gems:
@dbarria
dbarria / configure_proxy_protocol.md
Created February 8, 2017 20:08 — forked from pablitoc/configure_proxy_protocol.md
Configuring Proxy Protocol

##Install AWS CLI Tools##

  1. Install AWS CLI Tools. You can also use the EC2 API Tool if you are more comfortable with them. But this write-up uses the EC2 CLI.
  2. Create a user via Amazon IAM or download the security accessID and securitykey you will need it to query Amazon CLI.
  3. using Terminal cd into .aws directory cd ~/.aws edit or create new file named config paste the following contents inside.
    `[default]`
    `aws_access_key_id = ACCESS_ID`
    `aws_secret_access_key = SECRET_ID`
    `output = json OR bson OR text`
    `region = PREFERRED_AWS_REGION`

Save the file as "config"