Skip to content

Instantly share code, notes, and snippets.

<?php
/**
* Creates a link for email and then hide email address from Spam Bots in HTML using a shortcode.
* [email]hello@email.com[/email]
*
* @param array $atts Shortcode attributes. Not used.
* @param string $content The shortcode content. Should be an email address.
*
* @return string The obfuscated email address.
#!/usr/bin/env bash
#* * * * * command to be executed
#- - - - -
#| | | | |
#| | | | +----- day of week (0 - 6) (Sunday=0)
#| | | +------- month (1 - 12)
#| | +--------- day of month (1 - 31)
#| +----------- hour (0 - 23)
#+------------- min (0 - 59)
00 01 * * * /usr/local/bin/bash /Users/riskiii/bin/wp-db-backup
@dannygsmith
dannygsmith / wp-destroy
Last active October 3, 2017 19:00
Delete valet and valet plus
#!/usr/bin/env bash
#styles
VP_NONE='\033[00m'
VP_RED='\033[01;31m'
VP_GREEN='\033[01;32m'
VP_YELLOW='\033[01;33m'
VP_PURPLE='\033[01;35m'
VP_CYAN='\033[01;36m'
VP_WHITE='\033[01;37m'
blueprint
mai
material
oopsandbox
sample
susy-starter
tabber
blueprint
wp_mai
wp_material
wp_oopsandbox
wp_sample
wp_susy-starter
wp_tabber
@dannygsmith
dannygsmith / wp-db-restore
Last active December 13, 2017 03:47
Restore all WordPress databases in laravel valet
#!/usr/bin/env bash
SUFFIX=`date "+%w"`
#styles
VP_NONE='\033[00m'
VP_RED='\033[01;31m'
VP_GREEN='\033[01;32m'
VP_YELLOW='\033[01;33m'
VP_PURPLE='\033[01;35m'
@dannygsmith
dannygsmith / wp-db-backup
Last active October 3, 2017 18:54
backup all valet-plus databases
#!/usr/bin/env bash
export PATH="/usr/local/bin:$PATH";
SUFFIX=`date "+%w"`
readarray arr < /Users/riskiii/bin/hosts.txt
## now loop through the above array
for k in "${arr[@]}"
do
@dannygsmith
dannygsmith / valet-list
Last active June 10, 2019 15:51
List all valet-plus process's
#!/usr/bin/env bash
#styles
VP_NONE='\033[00m'
VP_RED='\033[01;31m'
VP_GREEN='\033[01;32m'
VP_YELLOW='\033[01;33m'
VP_PURPLE='\033[01;35m'
VP_CYAN='\033[01;36m'
VP_WHITE='\033[01;37m'
@dannygsmith
dannygsmith / valet-plus-destroy
Last active July 18, 2023 09:07
Remove valet-plus - reboot required
#!/usr/bin/env bash
#styles
VP_NONE='\033[00m'
VP_RED='\033[01;31m'
VP_GREEN='\033[01;32m'
VP_YELLOW='\033[01;33m'
VP_PURPLE='\033[01;35m'
VP_CYAN='\033[01;36m'
VP_WHITE='\033[01;37m'
@dannygsmith
dannygsmith / valet-plus-install
Last active September 29, 2021 12:48
Install valet-plus
#!/usr/bin/env bash
#styles
VP_NONE='\033[00m'
VP_RED='\033[01;31m'
VP_GREEN='\033[01;32m'
VP_YELLOW='\033[01;33m'
VP_PURPLE='\033[01;35m'
VP_CYAN='\033[01;36m'
VP_WHITE='\033[01;37m'