Skip to content

Instantly share code, notes, and snippets.

View SherylHohman's full-sized avatar

Sheryl Hohman SherylHohman

View GitHub Profile
@SherylHohman
SherylHohman / add-rsync-to-git-bash.md
Created July 26, 2019 17:13 — forked from hisplan/add-rsync-to-git-bash.md
Add rsync to git bash for windows
@SherylHohman
SherylHohman / wordpress-multi-env-configphp-setup.php
Created July 3, 2019 20:57 — forked from cballou/wordpress-multi-env-configphp-setup.php
Wordpress Multi-Environment wp-config.php Setup
<?php
/**
* This code is intended to be added to your wp-config.php file just below the top comment block.
* It should replace the existing define('DB_*') statements. You can add or remove sections
* depending on the number of environments you intend to setup. You should change all values of
* DB_NAME, DB_USER, DB_PASSWORD, and DB_HOST for each environment, making them all distinct
* for security purposes.
*/
// determine the current environment
@SherylHohman
SherylHohman / wp-config.php
Created January 5, 2019 09:25
Set WordPress site URL in the config file instead of the database
<?php
// WordPress stores the site URL in the database by default (which I have never
// understood), and it's a pain to have to type out the UPDATE SQL or search in
// phpMyAdmin to change it. This is a simple way to put the URL into
// wp-config.php instead.
// Note that you will still need to update any URLs that appear in the content,
// especially when you copy a database from a development site to production:
// https://gist.github.com/davejamesmiller/a8733a3fbb17e0ff0fb5
WP_HOME - where home is
homeurl
home_url()
Site Address (URL)
http://example.com
WP_SITEURL - where wordpress is (when having wp in a subdirectory home without the subdir path, like at https://codex.wordpress.org/Giving_WordPress_Its_Own_Directory)
siteurl
site_url()
@SherylHohman
SherylHohman / .eslintrc
Created January 3, 2018 19:18 — forked from cletusw/.eslintrc
ESLint Reset - A starter .eslintrc file that resets all rules to off and includes a description of what each rule does. From here, enable the rules that you care about by changing the 0 to a 1 or 2. 1 means warning (will not affect exit code) and 2 means error (will affect exit code).
{
// http://eslint.org/docs/rules/
"ecmaFeatures": {
"binaryLiterals": false, // enable binary literals
"blockBindings": false, // enable let and const (aka block bindings)
"defaultParams": false, // enable default function parameters
"forOf": false, // enable for-of loops
"generators": false, // enable generators
"objectLiteralComputedProperties": false, // enable computed object literal property names
@SherylHohman
SherylHohman / .eslintrc
Created January 3, 2018 19:18 — forked from guocheng/.eslintrc
A eslint config file for linting react/jsx and ES6 syntax. This file is based on (https://gist.github.com/cletusw/e01a85e399ab563b1236) and (https://github.com/kriasoft/react-starter-kit/blob/master/.eslintrc). Note that I use single quote in the rules, to change it, lookup 'quotes' and change it to `"quotes": [1, "double"].
{
"parser": "babel-eslint",
"env": {
"browser": true,
"node": true,
"es6": true
},
"ecmaFeatures": {
"jsx": true,
"modules": true,