Skip to content

Instantly share code, notes, and snippets.

View nitrotap's full-sized avatar

Kartik Jevaji nitrotap

View GitHub Profile
@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;
@nitrotap
nitrotap / code.gs
Created November 10, 2022 22:21
Google Apps Script Basic Sheet Functions
// todo add spreadsheet id
const spreadsheetId = '';
/** @OnlyCurrentDoc */
async function getDateCOI() {
// todo add master sheet name
let range = 'Sheet1';
try {
let write_array = []
<?php
// abstracted code
// create the abstract class
// basically a class that says any child classes need a method called get_drink_name and a variable called _drink_state
abstract class HotDrinksAbstract
{
abstract function get_drink_name();
// now if anyone else uses the HotDrinksAbstract Class, they will all have to specify a get_drink_name function
protected $_drink_state = 'hot';
// now all child classes will have the variable _drink_state available to them, and it will return hot