Skip to content

Instantly share code, notes, and snippets.

View yshmarov's full-sized avatar
🦄
vibing

Yaro Shm yshmarov

🦄
vibing
View GitHub Profile
@yshmarov
yshmarov / daisyui-muted-text-contrast.html
Created November 14, 2026 12:49
daisyUI 5.8.0: menu-title and inactive tab text contrast
<!doctype html>
<html data-theme="light">
<head>
<meta charset="utf-8">
<link href="https://cdn.jsdelivr.net/npm/daisyui@5.8.0/daisyui.css" rel="stylesheet">
<link href="https://cdn.jsdelivr.net/npm/daisyui@5.8.0/themes.css" rel="stylesheet">
</head>
<body class="p-8">
<ul class="menu bg-base-100 w-56">
<li class="menu-title">Menu title</li>
@yshmarov
yshmarov / mailer.html.erb
Created June 29, 2021 09:24
email layout styling example
<% # frozen_string_literal: true %>
<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type"/>
<scss>
body {
font-family: Helvetica, Arial, sans-serif;
.message {
width:600px;
border-top: 2px dashed;
@yshmarov
yshmarov / blob active_Storage
Created May 14, 2021 10:15
blob active_Storage
app/views/active_storage/blobs/_blob.html.haml
<%= render "active_storage/blobs/blob", blob: @post.avatar %>
<figure class="attachment attachment--<%= blob.representable? ? "preview" : "file" %> attachment--<%= blob.filename.extension %>">
<% if blob.representable? %>
<%= image_tag blob.representation(resize_to_limit: local_assigns[:in_gallery] ? [ 800, 600 ] : [ 1024, 768 ]) %>
<% elsif blob.image? %>
<%= image_tag blob, width: "200px" %>
<% elsif blob.audio? %>
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 / 0 AWS Cloud9
Last active January 5, 2026 18:57
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