Skip to content

Instantly share code, notes, and snippets.

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

Ralph Rosael coder-ralph

🎯
Focusing
  • Iloilo City, Philippines
  • 07:10 (UTC -08:00)
  • X @coderralph
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">
@cutiko
cutiko / Readme.md
Created November 22, 2019 18:24
Git delete last commit

Removing the last commit

To remove the last commit from git, you can simply run git reset --hard HEAD^ If you are removing multiple commits from the top, you can run git reset --hard HEAD~2 to remove the last two commits. You can increase the number to remove even more commits.

If you want to "uncommit" the commits, but keep the changes around for reworking, remove the "--hard": git reset HEAD^ which will evict the commits from the branch and from the index, but leave the working tree around.

If you want to save the commits on a new branch name, then run git branch newbranchname before doing the git reset.

ORIGINAL did fork but search didn't helped me

@apisandipas
apisandipas / share-urls.md
Last active December 12, 2024 13:26 — forked from chrisjlee/drupal-views-share-global-text-field
Share url's for Facebook, Twitter, Pinterest and Linkedin with just get variables

Creating share buttons with just URL's

Twitter

http://twitter.com/share?text=<TITLE>&url=<URL>

E.g. http://twitter.com/share?text=This+is+google+a+search+engine&url=https%3A%2F%2Fwww.google.com

Facebook

http://www.facebook.com/sharer.php?u=&amp;p[title]=

@thegitfather
thegitfather / vanilla-js-cheatsheet.md
Last active December 5, 2024 11:07
Vanilla JavaScript Quick Reference / Cheatsheet