Skip to content

Instantly share code, notes, and snippets.

Avatar

Danny G Smith dannygsmith

View GitHub Profile
@dannygsmith
dannygsmith / wp-mailhog.php
Created Nov 29, 2017 — forked from bishless/wp-mailhog.php
Configure WordPress on Valet to use MailHog
View wp-mailhog.php
<?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 Apr 23, 2018
Install all of the files for valet etc.
View install-files
#!/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 Nov 17, 2017
Sample bash_profile for students
View .bash_profile
#source ~/.profile
# .bash_profile
mesg n
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
@dannygsmith
dannygsmith / .bashrc
Created Nov 14, 2017
Sample .bashrc for students
View .bashrc
# .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 Nov 15, 2017
Install brew, xcode, and git if any are missing
View install-git
#!/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 Nov 12, 2017
Generating a new SSH key and adding it to the ssh-agent
View Windows
[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 Nov 12, 2017
Generating a new SSH key and adding it to the ssh-agent
View Mac OS X
[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 Nov 12, 2017
Backup the blueprint database, used by wp-create
View wp-blueprint-backup
#!/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 Oct 11, 2017 — forked from cdils/genesis-site-title.php
Filter the Genesis SEO Title to output with a custom class.
View genesis-site-title.php
// 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 Oct 4, 2017
Update local sites that are in hosts.txt
View wp-daily-updates
#!/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'
You can’t perform that action at this time.