Skip to content

Instantly share code, notes, and snippets.

View Isabellae4567's full-sized avatar

Isabellae4567

View GitHub Profile
@Isabellae4567
Isabellae4567 / gist:6453755b45c964ea71ae2753f6ea26b3
Created March 10, 2024 16:40
Snippet of code in Python using the pandas library to create a comparison table for comparing two apps:
import pandas as pd
# Define data for the first app
app1_data = {
"Feature": ["Feature1", "Feature2", "Feature3", "Feature4"],
"App1_Value": ["Value1", "Value2", "Value3", "Value4"]
}
# Define data for the second app
app2_data = {
@Isabellae4567
Isabellae4567 / gist:ba5682236efc31c4d80f7bbb518527cb
Created January 21, 2024 07:35
To add the location of a service through Google My Business (GMB) in your custom service-based website
To add the location of a service through Google My Business (GMB) in your custom service-based website, you can use the Google My Business API. Below is a simplified example using Python and the Google API client library. Before you proceed, make sure you have set up a project in the Google Cloud Console, enabled the Google My Business API, and obtained the necessary credentials.
import google.auth
from google.auth.transport.requests import Request
from google.oauth2.credentials import Credentials
from googleapiclient.discovery import build
# Load credentials from the file generated after setting up API access
creds = None
token_file = 'path/to/token.json' # Update with your token file path
@Isabellae4567
Isabellae4567 / gist:c16a242c51543230bda96d91de89a397
Created December 25, 2023 14:47
To add a search bar at the top of the sidebar in your GeneratePress websit
// Add search bar to the top of the sidebar
function add_search_bar_to_sidebar() {
?>
<div class="custom-sidebar-search">
<?php get_search_form(); ?>
</div>
<?php
}
add_action('generate_before_sidebar_content', 'add_search_bar_to_sidebar');
<!DOCTYPE html>
<html>
<head>
<title>Affiliate Product Price Comparison Table</title>
<style>
table {
border-collapse: collapse;
width: 80%;
margin: 20px auto;
}
@Isabellae4567
Isabellae4567 / gist:d9dfdf7196871ab6370f0f025e04873d
Created October 5, 2023 07:44
This code provides a simple framework for a forum where users can create posts and schedule consultations.
HTML for the Forum Page:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Forum</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
@Isabellae4567
Isabellae4567 / gist:112803dfe5883e3c23033cf46f9494ba
Created September 27, 2023 16:38
A simplified code snippet for a contact form that can be used in a WordPress website
HTML (contact_form.html):
<!DOCTYPE html>
<html>
<head>
<title>Contact Us</title>
</head>
<body>
<div class="contact-form">
<h2>Contact Us</h2>
<form action="process_form.php" method="POST">
@Isabellae4567
Isabellae4567 / gist:02c7ecd19079f7c42d64cd9b65bc1e49
Created September 3, 2023 14:09
Dynamic Ingredient Listing Script for Recipe Websites
<!DOCTYPE html>
<html>
<head>
<title>Recipe Ingredient Table</title>
<style>
/* Add CSS styling for the ingredient table */
table {
width: 100%;
border-collapse: collapse;
margin-bottom: 20px;