Skip to content

Instantly share code, notes, and snippets.

@lesm
lesm / digital_ocean_setup.md
Created January 19, 2018 18:25 — forked from ChuckJHardy/digital_ocean_setup.md
DigitalOcean Ubuntu 14.04 x64 + Rails 4 + Nginx + Unicorn + PostgreSQL + Capistrano 3 Setup Instructions

DigitalOcean Ubuntu 14.04 x64 + Rails 4 + Nginx + Unicorn + PostgreSQL + Capistrano 3

SSH into Root

$ ssh root@123.123.123.123

Change Root Password

@lesm
lesm / uniqness
Last active February 1, 2018 19:38
it { should validate_presence_of :name }
context 'uniqness' do
subject { build(:marca) }
it { should validate_uniqueness_of :sku }
end
FactoryGirl.define do
@lesm
lesm / payouts
Last active January 22, 2025 05:29
# create user (password)
password = Services::PasswordDigester.new.digest('password')
hash = Entities::User.new(id: SecureRandom.uuid, public_key: 'd3a13bdf38bec706dbf5fe45', secret_key: password, created_at: Time.now, updated_at: Time.now).to_h
Services::Persistence::Repos::UserRepo.new.create(hash)
Agregar logger a la aplicación
#transmission_id = 'e8d9a710-7af0-11eb-b682-5329c90f1393'
--[[
=====================================================================
==================== READ THIS BEFORE CONTINUING ====================
=====================================================================
======== .-----. ========
======== .----------------------. | === | ========
======== |.-""""""""""""""""""-.| |-----| ========
======== || || | === | ========
======== || KICKSTART.NVIM || |-----| ========
@lesm
lesm / list_properties.rb
Created January 22, 2025 05:32
EasyBroker API
# frozen_string_literal: true
require 'debug'
require 'faraday'
require 'rspec'
############## Entities ###############################################
class Property