Skip to content

Instantly share code, notes, and snippets.

View eduard-ungureanu's full-sized avatar
🎯
Focusing

Eduard Ungureanu eduard-ungureanu

🎯
Focusing
View GitHub Profile
@eduard-ungureanu
eduard-ungureanu / dt-posts.sh
Created January 10, 2025 07:57
Populate WordPress with 50 posts and projects
#!/bin/bash
# Define categories for posts
CATEGORIES=("Nature" "People" "Buildings" "Blog" "Technology" "Science" "History" "Art" "Food" "Travel" "Sports" "Entertainment")
# Define project categories
PROJECT_CATEGORIES=("Architecture" "Photography" "Design" "Technology" "Art" "Sports" "Travel" "Entertainment" "Science" "History" "Food" "Buildings")
# Define tags for posts and projects
POST_TAGS=("Adventure" "Travel" "Food" "Lifestyle" "Technology" "Fitness" "Education" "Health" "Business" "Entertainment")
@eduard-ungureanu
eduard-ungureanu / reset.sh
Created January 10, 2025 07:55
WordPress Local installation reset
#!/bin/bash
# Step 1: Reset the database
wp db reset --yes
# Step 2: Install WordPress with the given details
wp core install --url="http://d5.test" --title="Divi 5" --admin_user="eduard" --admin_password="thesaint" --admin_email="[email protected]"
# Step 3: Clean up the installation by emptying all default content
wp site empty --yes
@eduard-ungureanu
eduard-ungureanu / show.sh
Created January 10, 2025 07:53
Bash Script for listing the working branches
#!/bin/bash
# Function to print folder and branch with colors
print_folder_branch() {
local dir="$1"
# Define colors
FOLDER_COLOR="\033[1;34m" # Blue and bold
BRANCH_COLOR="\033[1;32m" # Green
RESET_COLOR="\033[0m" # Reset to default color
@eduard-ungureanu
eduard-ungureanu / check.sh
Created January 10, 2025 07:49
Switch Github Branches:
#!/usr/bin/env bash
set -e
ROOT_DIR=$(pwd)
BOLD=$(tput bold)
NORMAL=$(tput sgr0)
function green {
printf "\e[32m%s\e[0m\n" "${1}"
}
@eduard-ungureanu
eduard-ungureanu / new-twitter-logo.CSS
Created August 23, 2024 08:53
Update Twitter logo in Monarch
.et_social_networks .et_social_twitter .et_social_icon_twitter:before,
.et_social_networks .et_social_twitter .et_social_icon_twitter:after {
content: "\e094" !important;
font-family: ETModules !important;
}
.et_social_networks .et_social_twitter{
background-color: #000000 !important;
}
@eduard-ungureanu
eduard-ungureanu / blurb-image-height.css
Created August 23, 2024 08:39
Equalize Blurb Images Height
selector .et_pb_image_wrap img {
object-fit: cover;
height: 295px;
}
@eduard-ungureanu
eduard-ungureanu / check-readme.md
Last active July 31, 2024 05:56
Github Check

Instalation

  1. Install Python
  2. Open your terminal and type pip install requests
  3. Create a new file and call it check.py and save it inside a folder of your choice
  4. Paste this code
import requests
import os

def search_github_issues(repos, issue_title):
@eduard-ungureanu
eduard-ungureanu / Blog.php
Created November 10, 2023 11:23
Custom Blog module with Social Icons (Social Share by Supsystic plugin)
<?php
get_template_part( '/includes/builder/module/helpers/Overlay.php' );
class custom_ET_Builder_Module_Blog extends ET_Builder_Module_Type_PostBased {
/**
* Track if the module is currently rendering to prevent unnecessary rendering and recursion.
*
* @var bool
*/
@eduard-ungureanu
eduard-ungureanu / test.php
Created October 12, 2023 13:42
This is a simple PHP code
<?php
echo "hello world;
?>
@eduard-ungureanu
eduard-ungureanu / custom_functions.php
Created October 6, 2023 07:10
Update the PHP code to solve the get_page_by_title deprecation
<?php
// Prevent file from being loaded directly
if ( ! defined( 'ABSPATH' ) ) {
die( '-1' );
}
add_theme_support( 'custom-background', apply_filters( 'et_custom_background_args', array() ) );
if ( function_exists( 'add_post_type_support' ) ) {