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 / stack
Last active September 28, 2015 22:40
Set-ExplorerOptions -showHidenFilesFoldersDrives -showProtectedOSFiles -showFileExtensions Enable-RemoteDesktop
cinst install php
cinst vcredist2013
cinst javaruntime
cinst sublimetext3
cinst smartgit
cinst sourcetree
cinst heidisql
cinst dia
cinst vagrant
@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"

@dbarria
dbarria / random_codes
Created April 18, 2017 16:15
Random codes generation
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Let's Talk</title>
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/2.1.1/css/bootstrap.min.css" media="screen" rel="stylesheet" type="text/css" />
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/2.1.1/css/bootstrap-responsive.min.css" media="screen" rel="stylesheet" type="text/css" />
<style>
.v-offset{
$.finishScroll = false;
$.scrollFullPage = function() {
var scroll = 0;
var time = 0;
var body = document.body,
html = document.documentElement;
var realHeight = Math.max( body.scrollHeight, body.offsetHeight, html.clientHeight, html.scrollHeight, html.offsetHeight );
while(scroll < realHeight){
time = time + 1600;
@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:
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
<html>
<head>
<script type="application/javascript" src=https://bancoamericano.staging.letsta.lk/widget.js></script>
</head>
<object data="https://google.cl/" width="100%" height="800px">
<embed src="https://google.cl/" width="100%″" height="800px" />
<html>
<head>
<script type="application/javascript" src=https://bci.staging.letsta.lk/widget.js></script>
</head>
<object data="https://google.cl/" width="100%" height="800px">
<embed src="https://google.cl/" width="100%″" height="800px" />
<html>
<head>
<script type="application/javascript" src=https://bancoestado.staging.letsta.lk/widget.js></script>
</head>
<object data="https://google.cl/" width="100%" height="800px">
<embed src="https://google.cl/" width="100%″" height="800px" />
<html>
<head>
<script type="application/javascript" src=https://bci.staging.letsta.lk/widget.js></script>
</head>
<object data="https://google.cl/" width="100%" height="800px">
<embed src="https://google.cl/" width="100%″" height="800px" />