Skip to content

Instantly share code, notes, and snippets.

Danny G Smith dannygsmith

Block or report user

Report or block dannygsmith

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
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
View my.cnf
[client]
user=root
password=root
host=localhost
[mysqld]
sql_mode="NO_ENGINE_SUBSTITUTION"
innodb_file_per_table = OFF
show_compatibility_56=ON
open_files_limit=999999
@dannygsmith
dannygsmith / my.txt
Created Nov 15, 2017
default password for mysql
View my.txt
[client]
user=root
password=root
@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
You can’t perform that action at this time.