Skip to content

Instantly share code, notes, and snippets.

@dannygsmith
dannygsmith / wp-drop
Created October 3, 2017 19:01
Drop one laravel valet site
#!/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 / wp-create
Last active December 29, 2018 09:56
Script to create new WordPress Site
#!/usr/bin/env bash
export HOME="/Users/john"
#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 / valet-list
Created October 3, 2017 23:27
Script to list what web stacks are running
#!/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 / wp-updates
Created October 3, 2017 23:43
This script will update all themes and plugins
#!/usr/bin/env bash
export PATH="/usr/local/bin:$PATH";
#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'
@dannygsmith
dannygsmith / wp-daily-updates
Created October 4, 2017 14:20
Update local sites that are in hosts.txt
#!/usr/bin/env bash
export PATH="/usr/local/bin:$PATH";
#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'
@dannygsmith
dannygsmith / genesis-site-title.php
Created October 11, 2017 04:05 — forked from cdils/genesis-site-title.php
Filter the Genesis SEO Title to output with a custom class.
// Filter the title with a custom function
add_filter('genesis_seo_title', 'wap_site_title' );
// Add additional custom style to site header
function wap_site_title( $title ) {
// Change $custom_title text as you wish
$custom_title = '<span class="custom-title">WA</span>Estate';
// Don't change the rest of this on down
@dannygsmith
dannygsmith / wp-blueprint-backup
Created November 12, 2017 00:02
Backup the blueprint database, used by wp-create
#!/usr/bin/env bash
export PATH="/usr/local/bin:$PATH";
cd "${HOME}/Sites/blueprint/"
printf -v x "%s%s.sql" "${HOME}/Sites/blueprint/" blueprint
/usr/local/bin/mysqldump --defaults-file="${HOME}/bin/my.txt" \
--add-drop-table blueprint \
> $x 2>/dev/null
@dannygsmith
dannygsmith / Mac OS X
Created November 12, 2017 19:57
Generating a new SSH key and adding it to the ssh-agent
[Source](https://help.github.com/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent/ "Permalink to Generating a new SSH key and adding it to the ssh-agent")
# Generating a new SSH key and adding it to the ssh-agent
After you've checked for existing SSH keys, you can generate a new SSH key to use for authentication, then add it to the ssh-agent.
If you don't already have an SSH key, you must [generate a new SSH key][1]. If you're unsure whether you already have an SSH key, check for [existing keys][2].
If you don't want to reenter your passphrase every time you use your SSH key, you can [add your key to the SSH agent][3], which manages your SSH keys and remembers your passphrase.
@dannygsmith
dannygsmith / Windows
Created November 12, 2017 19:58
Generating a new SSH key and adding it to the ssh-agent
[Source](https://help.github.com/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent/ "Permalink to Generating a new SSH key and adding it to the ssh-agent")
# Generating a new SSH key and adding it to the ssh-agent
After you've checked for existing SSH keys, you can generate a new SSH key to use for authentication, then add it to the ssh-agent.
If you don't already have an SSH key, you must [generate a new SSH key][1]. If you're unsure whether you already have an SSH key, check for [existing keys][2].
If you don't want to reenter your passphrase every time you use your SSH key, you can [add your key to the SSH agent][3], which manages your SSH keys and remembers your passphrase.
@dannygsmith
dannygsmith / install-git
Last active November 15, 2017 01:19
Install brew, xcode, and git if any are missing
#!/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'