Skip to content

Instantly share code, notes, and snippets.

@dannygsmith
dannygsmith / wp-mailhog.php
Created November 29, 2017 18:53 — forked from bishless/wp-mailhog.php
Configure WordPress on Valet to use MailHog
<?php
/**
* @link
* @since 1.0.0
* @package TODO
*
* @wordpress-plugin
* Plugin Name: Use MailHog
* Description: Configure WordPress on Valet to use MailHog
* Version: 1.0.0
@dannygsmith
dannygsmith / install-files
Last active April 23, 2018 19:50
Install all of the files for valet etc.
#!/usr/bin/env bash
SCRIPTS="bin"
#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 / .bash_profile
Last active November 17, 2017 13:49
Sample bash_profile for students
#source ~/.profile
# .bash_profile
mesg n
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
@dannygsmith
dannygsmith / .bashrc
Created November 14, 2017 22:28
Sample .bashrc for students
# .bashrc
# User specific aliases and functions
#stty erase ^h intr ^c
export TZ=CST+06CD
export LS_OPTIONS='-G -A -T --colors=always '
export TZ='America/Chicago'
@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'
@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 / 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 / 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 / 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-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'