vince

Rewards

Cash flow and equity Purchase price tends to be relatively low compared to profits If you buy a business for $10.25m with $2.5m profits that gives you a 25% annual return Let's say closing costs ar...

  • Updated 5 months ago by vince
Risks

Risks Lower revenue after purchase loss of customers to competitors tech you have invested in crashes unable to pay employees that depend on you won't have a familiar peer group at work Mitigate yo...

  • Updated 5 months ago by vince
Chapter 1: The opportunity

Buy a business, right now, and run it as a CEO Flexibility to run it in a way that suits you Typically purchased with a combination of loans from banks and equity from investors Upsides are profits...

Pessimistic locking in Rails

https://dev.to/nodefiend/rails-pessimistic-locking-45ak Locking::Pessimistic provides support for row-level locking ruby Account.lock.find(1) Start a transaction and lock at the same time by calli...

  • Updated 6 months ago by vince
Set up CORS on Amazon S3

https://docs.aws.amazon.com/AmazonS3/latest/user-guide/add-cors-configuration.html

  • Updated 6 months ago by vince
Use different credit cards for different Heroku apps

https://help.heroku.com/T8Q2N4SV/how-do-i-manage-billing-multiple-clients-with-separate-apps

  • Updated 6 months ago by vince
Convert local master into a branch

If you want to convert a local master branch (that is ahead of remote) into a branch bash git checkout master git branch experiment git reset --hard heroku/master git checkout experiment

  • Updated 7 months ago by vince
Sidekiq

bash require 'sidekiq/api' https://stackoverflow.com/questions/12683222/are-there-console-commands-to-look-at-whats-in-the-queue-and-to-clear-the-queue ```yml :verbose: false :concurrency: 15 :max...

  • Updated 7 months ago by vince
Create a random password in Rails

ruby SecureRandom.alphanumeric

  • Updated 7 months ago by vince
Compared to Remote schooling

https://www.nytimes.com/2020/09/23/style/wild-and-free-home-school.html

  • Updated 7 months ago by vince
Run a Rails server on https and localhost

openssl req -x509 -sha256 -nodes -newkey rsa:2048 -days 365 -keyout localhost.key -out localhost.crt then rails s -b 'ssl://localhost:3000?key=localhost.key&cert=localhost.crt' This will give y...

  • Updated 7 months ago by vince
Foreign exchange accounting

https://www.accountingtools.com/articles/foreign-exchange-accounting.html

  • Updated 8 months ago by vince
Modeling double entry accounting in a relational database

https://stackoverflow.com/questions/59432964/relational-data-model-for-double-entry-accounting https://medium.com/@RobertKhou/double-entry-accounting-in-a-relational-database-2b7838a5d7f8 https://c...

  • Updated 8 months ago by vince
Rails Multi Environment Credentials

I ended up deleting master.key and credentials.yml.enc since I'd rather use development and production specific keys and credentials per below bash EDITOR="mate --wait" bin/rails credentials:edit -...

  • Updated about 1 month ago by vince
Pass persisted params in a Rails form

If the params you want to persist are state and order ruby <% request.params.slice('state', 'order').each do |key, value| %> <%= hidden_field_tag key, value %> <% end %>

  • Updated 8 months ago by vince
Find a process and kill it in terminal

% ps aux | grep ruby lukeko 29806 0.0 0.0 4277500 696 s000 S+ 6:49PM 0:00.00 <process you don't want> % kill -9 29806

  • Updated 8 months ago by vince
Actiontext

Go to https://guides.rubyonrails.org/actiontextoverview.html Only extra things left to do is @import "trix/dist/trix";

  • Updated 8 months ago by vince
Add Stripe to a Rails app

https://courses.gorails.com/payments-with-rails-master-class https://rubygems.org/gems/stripe

  • Updated 7 months ago by vince
Checkout one from from a previous commit

git checkout c96a579 app/assets/stylesheets/menu.scss

  • Updated 8 months ago by vince