Skip to content

Instantly share code, notes, and snippets.

View preston-56's full-sized avatar

Preston Osoro preston-56

View GitHub Profile
@preston-56
preston-56 / fruits.rb
Last active February 15, 2023 10:54
test
# define a method `solution(a, b, c)` that calculates the total cost of buying all the fruits in a basket.
# The method takes in three parameters:
# a: an array of strings representing the names of the fruits in the basket.
# b: an array of integers representing the prices of each fruit, in the same order as the a array.
# c: a hash that maps the names of the fruits to their corresponding discount percentages.
# The method should return a single integer - the total cost of all the fruits in the basket after applying the discounts.
# Sample input
# a = ["apple", "orange", "banana", "apple", "banana"]
# b = [50, 40, 30]
# c = { "apple" => 10, "orange" => 20, "banana" => 5 }
@sharu725
sharu725 / subscribe-form.html
Last active May 3, 2025 13:43
Jekyll Subscribe Form using Mailchimp
<!--
Before implementing this jekyll snippet make sure
1. you have signed up with Mailchimp.
2. you have created a list in Mailchimp.
3. you have defined the list in _config.yml,
for ex: "mailchimp-list: //redgadgets.us10.list-manage.com/subscribe/post?u=210acce5db69d3d4a04b0e25d&amp;id=08c6708f40"
-->
<form action="{{site.mailchimp-list}}" method="post" name="mc-embedded-subscribe-form" class="wj-contact-form validate" target="_blank" novalidate>
<div class="mc-field-group">
@rxaviers
rxaviers / gist:7360908
Last active October 2, 2026 01:11
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: πŸ˜„ :smile: πŸ˜† :laughing:
😊 :blush: πŸ˜ƒ :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
πŸ˜† :satisfied: 😁 :grin: πŸ˜‰ :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: πŸ˜€ :grinning:
πŸ˜— :kissing: πŸ˜™ :kissing_smiling_eyes: πŸ˜› :stuck_out_tongue: