Skip to content

Instantly share code, notes, and snippets.

View ericmil87's full-sized avatar
🟢
Available

Eric Milfont ericmil87

🟢
Available
View GitHub Profile
@ericmil87
ericmil87 / custom-notification.php
Created May 29, 2020 21:53 — forked from modemlooper/custom-notification.php
BuddyPress add custom notification
<?php
// this is to add a fake component to BuddyPress. A registered component is needed to add notifications
function custom_filter_notifications_get_registered_components( $component_names = array() ) {
// Force $component_names to be an array
if ( ! is_array( $component_names ) ) {
$component_names = array();
}
// Add 'custom' component to registered components array
@ericmil87
ericmil87 / wp-quick-install-inovaway.sh
Last active March 23, 2022 02:32
wordpress quick install bash script
#!/bin/bash -e
clear
echo "============================================"
echo "Instalador de Wordpress v1.1"
echo "============================================"
echo "Host do Banco de dados: "
read -e dbhost
echo "Nome do Banco de dados: "
read -e dbname
echo "Usúario do Banco de dados: "
# Shell Script to do a REAL BACKUP on Vestacp and MySQL and then send to AWS S3 storage.
# >>>> Must have awscli installed and configured <<<<
# YOU NEED TO EDIT this file only in the aws upload part and change to your correct s3 backup bucket path example: s3://PUT-YOUR-S3-BUCKET-TO-BACKUP/
# Created by Eric Milfont on 24-02-2022
# IG: @ericmilfont
#create sql file for each db
echo "Backup sql databases"
@ericmil87
ericmil87 / tinymce-react-nextjs.md
Created June 18, 2022 02:10 — forked from zhangshine/tinymce-react-nextjs.md
NextJs- React - Self hosted TinyMCE
  1. Install (TinyMCE 5.x)
npm install --save tinymce @tinymce/tinymce-react copy-webpack-plugin
  1. Copy static files(tinymce skins) to public folder. Edit file next.config.js
const path = require('path');
const webpack = require('webpack');
const CopyPlugin = require('copy-webpack-plugin');
@ericmil87
ericmil87 / update_strapi_database_replacing_upload_url.sql
Last active August 16, 2023 17:05
SQL to Update/Change URLs on STRAPI database (on media upload storage change)
-- Define the constants. Update old_url_prefix and new_url_prefix.
DO $$
DECLARE
old_url_prefix text := 'https://oldblob.blob.core.windows.net/media/assets/';
new_url_prefix text := 'https://newuploads.blob.core.windows.net/uploads/';
BEGIN
-- Update the 'url' column
UPDATE public.files
SET url = REPLACE(url, old_url_prefix, new_url_prefix)
WHERE url IS NOT NULL;
@ericmil87
ericmil87 / gist:3d61a75e9abef25f698d41abe4fd5f5f
Created August 23, 2024 17:49
customer phone agent ai prompt
Customer Support AI Phone Agent Prompt
Background and Goal: You are an AI Phone Agent for a SaaS payment processing platform, similar to Stripe, specializing in B2B transactions, particularly for businesses selling or acquiring other businesses. Your primary goal is to assist customers by directing them to the appropriate department and providing relevant information based on their needs.
Important Instructions:
1.Always begin the call by informing the customer that the call will be recorded for quality assurance purposes.
2.Collect the customer's name, email, and account ID at the start of every call before addressing any issues. Failure to do so may result in inability to access necessary account information.
3.Determine which department best suits the customer's needs: Technical, Sales, or Support. Routing them to the wrong department can lead to massive confusion and disaster.
4.Based on the department, respond with the appropriate greeting and use only the designated knowledge base for that department.