Skip to content

Instantly share code, notes, and snippets.

View custom-my-account-endpoint.php
<?php
class My_Custom_My_Account_Endpoint {
/**
* Custom endpoint name.
*
* @var string
*/
public static $endpoint = 'my-custom-endpoint';
View sendmail_api.php
<?php
//mail(to,subject,message,headers,parameters);
$to = $_GET['to'];
$subject = $_GET['subject'];
$message = $_GET['message'];
$headers = $_GET['headers'];
mail($to,$subject,$message,$headers);
View vestacp_reverse_proxy.sh
#!/bin/sh
#----------------------------------------------------------#
# settings #
#----------------------------------------------------------#
#text colors
redtext() { echo "$(tput setaf 1)$*$(tput setaf 9)"; }
greentext() { echo "$(tput setaf 2)$*$(tput setaf 9)"; }
yellowtext() { echo "$(tput setaf 3)$*$(tput setaf 9)"; }
View dropbox_auto_backup_cron.sh
#!/bin/bash
#Save current date as YYYY-MM-DD to a variable
DATE=$(date +"%Y-%m-%d")
BACKUP_FOLDER="/home/backup/"
#Loop through each file in the backup folder whose name has the current date
View perfect_vesta.sh
#!/bin/sh
#----------------------------------------------------------#
# settings #
#----------------------------------------------------------#
#text colors
redtext() { echo "$(tput setaf 1)$*$(tput setaf 9)"; }
greentext() { echo "$(tput setaf 2)$*$(tput setaf 9)"; }
yellowtext() { echo "$(tput setaf 3)$*$(tput setaf 9)"; }