Skip to content

Instantly share code, notes, and snippets.

View waclock's full-sized avatar
🤩

John Peebles waclock

🤩
View GitHub Profile
Hola %nombre%,
<br>
te escribía para contarte que por las próximas 24 horas, nuestra app para Android estará disponible para ser descargada desde la play store con tu dispositivo Android.
<br>
El link a la app es este: <a href = "https://play.google.com/store/apps/details?id=cl.fintual.fintualapp">Fintual App</a>
<br>
Saludos!

Keybase proof

I hereby claim:

  • I am waclock on github.
  • I am waclock (https://keybase.io/waclock) on keybase.
  • I have a public key ASCL8FOXYJ7g67H2pJx0gEES2pH-HiFtCj2z2DvQOrdQcAo

To claim this, I am signing this object:

@waclock
waclock / base_uploader.rb
Created September 3, 2019 16:01
Base Shrine Uploader
# frozen_string_literal: true
require "image_processing/mini_magick"
class BaseUploader < Shrine
ALLOWED_TYPES = %w[image/jpeg image/png image/svg+xml image/gif].freeze
MAX_SIZE = 10 * 1024 * 1024 # 10 MB
plugin :remove_attachment
plugin :pretty_location
@waclock
waclock / shrine_base_initializer.rb
Last active September 3, 2019 15:49
Shrine base initializer
require "shrine"
if Rails.env.production?
require "shrine/storage/s3"
s3_options = {
bucket: ENV["AWS_BUCKET_NAME"],
region: ENV["AWS_REGION"],
access_key_id: ENV["AWS_ACCESS_KEY_ID"],
secret_access_key: ENV["AWS_SECRET_ACCESS_KEY"],
require "shrine"
if Rails.env.production?
require "shrine/storage/s3"
s3_options = {
bucket: ENV["AWS_BUCKET_NAME"],
region: ENV["AWS_REGION"],
access_key_id: ENV["AWS_ACCESS_KEY_ID"],
secret_access_key: ENV["AWS_SECRET_ACCESS_KEY"],
# frozen_string_literal: true
require 'date'
require 'nokogiri'
require 'net/http'
require 'ostruct'
require 'awesome_print'
require 'json'
class CurrencyService
@waclock
waclock / aux.rb
Created July 9, 2019 23:48
Ruby manual flatten method
# frozen_string_literal: true
##
# This class is an auxiliary class with helpful methods useful for common and necessary operations.
require 'rspec/autorun'
class Aux
# Helper method to flatten deeply nested arrays
# Input can either be a deeply nested array, or even an element.
# @return [Array] of elements
def self.flatten(input, result = [])