Skip to content

Instantly share code, notes, and snippets.

View yshmarov's full-sized avatar
🇺🇦

Yaro Shm yshmarov

🇺🇦
View GitHub Profile
@yshmarov
yshmarov / bootstrap_card.html
Created January 21, 2021 13:47
bootstrap card syling
<div class="card shadow">
<div class="card-header">
<h2>
</h2>
</div>
<div class="card-body">
</div>
<div class="card-footer">
</div>
</div>
constraints SubdomainRequired do
root to: 'dashboards#show', as: 'subdomain_root'
end
class SubdomainRequired
def self.matches?(request)
request.subdomain.present? && request.subdomain != "www"
end
end
@yshmarov
yshmarov / _thumbnail.html.erb
Last active September 9, 2024 15:17
embed Youtube in ActionText
app/views/youtubes/_thumbnail.html.erb
<div>
<%= image_tag youtube.thumbnail_url, style: "max-width:400px" %>
</div>
@yshmarov
yshmarov / 0 AWS Cloud9
Last active April 23, 2025 07:22
Ruby on Rails 6: Learn 25+ gems and build a Startup MVP 2020
# All AWS C9 envments
https://eu-central-1.console.aws.amazon.com/cloud9/home?region=us-east-1
# Instance management
https://console.aws.amazon.com/ec2/home?region=eu-central-1#Instances:sort=instanceId
# Create AWS C9 environment
https://eu-central-1.console.aws.amazon.com/cloud9/home/create
Setting - set tabs to 2
@yshmarov
yshmarov / database.yml
Last active November 11, 2020 19:46
commands for activating pg (postgresql) for rails on c9.io platform
default: &default
adapter: postgresql
encoding: unicode
pool: 5
username: yaro
password: pass
host: <%= ENV['IP'] %>
development:
<<: *default