Skip to content

Instantly share code, notes, and snippets.

blueprint
mai
material
oopsandbox
sample
susy-starter
tabber
@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'
#!/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
<?php
/**
* Creates a link for email and then hide email address from Spam Bots in HTML using a shortcode.
* [email][email protected][/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.
@dannygsmith
dannygsmith / prepare-for-scripts
Last active October 3, 2017 19:20
Bash script to prepare for installing laravel valet
#!/usr/bin/env bash
# create the folder
mkdir "${HOME}/bin"
cd "${HOME}/bin"
# create the empty files
touch valet-list
touch valet-destroy
touch valet-install
@dannygsmith
dannygsmith / wp-hosts-secure
Created September 29, 2017 01:02
Secureing all hosts
#!/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-install
Last active November 18, 2017 14:50
Script to install Laravel Valet by first checking for any other web stacks
#!/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-destroy
Last active October 3, 2017 21:43
Script to remove laravel valet
#!/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 / valetStart
Created October 3, 2017 18:51
Script to start laravel valet
#!/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 / valetStop
Created October 3, 2017 18:52
Script to stop laravel valet
#!/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'