Skip to content

Instantly share code, notes, and snippets.

View nitrotap's full-sized avatar

Kartik Jevaji nitrotap

View GitHub Profile
import os
import subprocess
import sys
import venv
def create_virtual_env(env_dir):
"""Create a virtual environment in the specified directory."""
if not os.path.exists(env_dir):
print(f"Creating virtual environment at {env_dir}...")
venv.create(env_dir, with_pip=True)
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Organization",
"name": "Your Organization Name",
"url": "https://www.yourwebsite.com",
"logo": "https://www.yourwebsite.com/logo.png",
"contactPoint": {
"@type": "ContactPoint",
"telephone": "+1-800-555-5555",
@nitrotap
nitrotap / timezones.ts
Created April 12, 2024 18:10
timezones
class TimeZone {
abbreviation: string,
locale: string,
utcOffset: number,
timezone: string
}
const timezones: TimeZone[] = [
{ abbreviation: 'IDLW', locale: 'en-US', utcOffset: -12, timezone: 'Etc/GMT+12' },
{ abbreviation: 'NUT', locale: 'en-NU', utcOffset: -11, timezone: 'Pacific/Niue' },
{ abbreviation: 'SST', locale: 'en-AS', utcOffset: -11, timezone: 'Pacific/Pago_Pago' },
@keyframes gradientBG {
0% {
background-image: linear-gradient(45deg, #ff9a9e, #fad0c4);
}
20% {
background-image: linear-gradient(45deg, #a18cd1, #fbc2eb);
}
40% {
background-image: linear-gradient(45deg, #fad0c4, #ffd1ff);
}
@nitrotap
nitrotap / index.html
Last active April 4, 2024 20:55
accordion-poc
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Dynamic Cards</title>
<link rel="stylesheet" href="style.css">
</head>
@nitrotap
nitrotap / countries.js
Last active March 13, 2024 21:36
country codes
const countries = {
Afghanistan: { code: 'AF', name: 'Afghanistan', dialCode: '+93', flagEmoji: '🇦🇫', flagEncoding: '&#127462;&#127487;' },
Albania: { code: 'AL', name: 'Albania', dialCode: '+355', flagEmoji: '🇦🇱', flagEncoding: '&#127462;&#127473;' },
Algeria: { code: 'DZ', name: 'Algeria', dialCode: '+213', flagEmoji: '🇩🇿', flagEncoding: '&#127462;&#127473;' },
Andorra: { code: 'AD', name: 'Andorra', dialCode: '+376', flagEmoji: '🇦🇩', flagEncoding: '&#127462;&#127464;' },
Angola: { code: 'AO', name: 'Angola', dialCode: '+244', flagEmoji: '🇦🇴', flagEncoding: '&#127462;&#127472;' },
Anguilla: { code: 'AI', name: 'Anguilla', dialCode: '+1', flagEmoji: '🇦🇮', flagEncoding: '&#127462;&#127470;' },
Antigua_and_Barbuda: { code: 'AG', name: 'Antigua and Barbuda', dialCode: '+1', flagEmoji: '🇦🇬', flagEncoding: '&#127462;&#127464;' },
Argentina: { code: 'AR', name: 'Argentina', dialCode: '+54', flagEmoji: '🇦🇷', flagEncoding: '&#127462;&#127480;' },
Armenia: { code: 'AM', name: 'Armenia', dialCode: '+
enum Country {
Afghanistan = "+93",
Albania = "+355",
Algeria = "+213",
Andorra = "+376",
Angola = "+244",
Anguilla = "+1",
AntiguaAndBarbuda = "+1",
Argentina = "+54",
Armenia = "+374",

Mastering Essential Front-End Design Frameworks: An In-Depth Exploration

In the fast-paced world of web design, adopting proven design frameworks can mean the difference between a forgettable and an unforgettable user experience. Design frameworks—essentially a set of best practices—are the building blocks that can help you craft intuitive, engaging websites and apps. Here's an elaborate examination of vital front-end design patterns, each one illuminated with three practical examples.

1. Chronological Displays: Timelines

In-Depth Look:
Timelines serve as a storytelling medium that arranges events, steps, or activities over a period. Whether vertical or horizontal, timelines bring structure and coherence to what could otherwise be disparate data.

Practical Examples:

@nitrotap
nitrotap / index.html
Last active August 19, 2023 03:02
tabbed interface
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Vertical Tabbed Timeline Interface</title>
<style>
body {
font-family: Arial, sans-serif;