Skip to content

Instantly share code, notes, and snippets.

View coder-ralph's full-sized avatar
🎯
Focusing

Ralph Rosael coder-ralph

🎯
Focusing
View GitHub Profile
@coder-ralph
coder-ralph / Holiday Greeting.py
Last active March 27, 2023 02:34
This function generates a holiday greeting with a variety of personalized elements.
# PythonPH - Holiday Coding Challenge
import random
# holiday greetings
def holiday_greeting(name, holiday):
greetings = ["Merry", "Happy", "Joyous", "Cheerful", "Festive"]
feelings = ["love", "joy", "peace", "happiness", "warmth"]
actions = ["spreading", "sharing", "bringing", "sending"]
greeting = random.choice(greetings) + " " + holiday + ","
feeling = "filled with " + random.choice(feelings) + ","
import React from 'react';
import moment from 'moment';
import Image from 'next/image';
import Link from 'next/link';
const FeaturedPostCard = ({ post }) => (
<div className="relative h-72">
<div className="absolute rounded-lg bg-center bg-no-repeat bg-cover shadow-md inline-block w-full h-72" style={{ backgroundImage: `url('${post.featuredImage.url}')` }} />
<div className="absolute rounded-lg bg-center bg-gradient-to-b opacity-50 from-gray-400 via-gray-700 to-black w-full h-72" />
<div className="flex flex-col rounded-lg p-4 items-center justify-center absolute w-full h-full">
@thegitfather
thegitfather / vanilla-js-cheatsheet.md
Last active May 2, 2024 07:32
Vanilla JavaScript Quick Reference / Cheatsheet