# Gradient Border Technique for Tailwind CSS
A technique for creating refined gradient borders using box shadows instead of CSS borders. This approach allows borders to blend naturally with existing shadows for a modern, polished appearance.
## How It Works
Rather than using a `border`, layered box shadows with negative spread values create the border effect. This enables the border to merge cleanly with element shadows and produces a subtle gradient-like feel.
## Key Principles
1. **Box-sizing**: All elements use `border-box` (set globally).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Lightweight Todo Completion Quality Check | |
| input=$(cat) | |
| # Extract tool name with error handling | |
| if ! tool_name=$(echo "$input" | jq -r '.tool_name' 2>/dev/null); then | |
| exit 0 # Invalid JSON, skip check | |
| fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Production Docker Host Hardening Script v2 | |
| # For Ubuntu Server 24.04 LTS (Noble) | |
| # Suitable for both Kamal deployment and builder hosts | |
| set -euo pipefail | |
| IFS=$'\n\t' | |
| # --- Constants --- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Tailwind plugin for forms. | |
| // Basically: https://github.com/tailwindlabs/tailwindcss-forms/blob/main/src/index.js | |
| // But with a few changes. And it's easier to maintain this way. | |
| const svgToDataUri = require("mini-svg-data-uri") | |
| const plugin = require("tailwindcss/plugin") | |
| const defaultTheme = require("tailwindcss/defaultTheme") | |
| const colors = require("tailwindcss/colors") | |
| const [baseFontSize, { lineHeight: baseLineHeight }] = | |
| defaultTheme.fontSize.base | |
| const { spacing, borderWidth, borderRadius } = defaultTheme |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| REVOKE ALL ON DATABASE demo_database FROM demo_user; | |
| GRANT CONNECT ON DATABASE demo_database TO demo_user; | |
| GRANT USAGE, CREATE ON SCHEMA public TO demo_user; | |
| GRANT SELECT, INSERT, UPDATE, DELETE ON ALL TABLES IN SCHEMA public TO demo_user; | |
| GRANT USAGE ON ALL SEQUENCES IN SCHEMA public TO demo_user; | |
| ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT SELECT, INSERT, UPDATE, DELETE ON TABLES TO demo_user; | |
| ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT USAGE ON SEQUENCES TO demo_user; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from transformers import AutoTokenizer, AutoModel | |
| import torch | |
| # MODEL CKPT is downloaded from: "jinaai/jina-embeddings-v2-base-en" # has context len of 8192 | |
| MODEL_CKPT = "/Users/rohan/3_Resources/ai_models/jina-embeddings-v2-base-en" | |
| def recursive_splitter(text: str, separators: list[str], chunk_size: int) -> list[str]: | |
| if len(separators) == 0: | |
| words = text.strip().split(' ') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'googleauth' | |
| require 'json' | |
| require 'net/http' | |
| require 'uri' | |
| require 'nokogiri' # to parse the sitemap | |
| require 'cgi' | |
| SCOPES = ['https://www.googleapis.com/auth/indexing'] | |
| ENDPOINT = 'https://indexing.googleapis.com/v3/urlNotifications:publish' | |
| JSON_KEY_FILE = 'page-indexing-000000-26ca419af0a4.json' #replace with your json key file |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| resource "aws_ecr_repository" "repo" { | |
| name = "${var.product_name}-app" | |
| } | |
| resource "aws_ecr_lifecycle_policy" "ecr-lifecycle-policy" { | |
| repository = aws_ecr_repository.repo.name | |
| policy = jsonencode({ | |
| rules = [ | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # /app/models/concerns/has_many_attached.rb | |
| module HasManyAttached | |
| extend ActiveSupport::Concern | |
| class_methods do | |
| def has_many_attached(name, dependent: :purge_later, service: nil, strict_loading: false, **options) | |
| super(name, dependent: :purge_later, service: nil, strict_loading: false) | |
| if options[:file_types].any? | |
| validate "validate_#{name}_file_types".to_sym |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| registry-github: &docker | |
| username: username | |
| password: | |
| - DOCKER_TOKEN | |
| registry-internal: &internal | |
| server: registry.example.com | |
| username: testuser | |
| password: testpassword123 | |
| # This uses YAML magic and Ruby template language to select registry on the fly | |
| registry: *<%= ENV["MRSK_REGISTRY"] || 'internal' %> |
NewerOlder