Categories
Fixing Stuff Samuel Technology

Fixing Nest Thermostate In 20 Degree Weather

We woke up today with a nest thermostat was showing “dead battery”. After some googling around we realized we could take it off the wall and plug it into a USB cable to charge it. So we did that and 10 minutes later it was showing the message “connect to base”. So we put it back on and still no luck, it showed wiring error E74. After some more searching around we came across a nest support page that explained when the weather gets cold there is sometimes a safty shut off switch on your AC that activates preventing the nest from getting power. The solution is to simply unplug the Y1 power and plug the nest back into the base. The Unit should instantly kick on and start heating again:

Link to nest support page documenting how to remove the Y1 wire: https://nest.com/support/article/Troubleshooting-Nest-Thermostat-power-errors-when-it-gets-cold-outside

If you keep running into this issue, you can change the ground wire into a commmon wire buy following the instructions on this video: https://www.youtube.com/watch?v=R039DH7HASg

Categories
Finance Samuel

Favorite MMM’s

This is just a running list of my favorite MMM posts as I re-read his entire blog:

It’s All About the Safety Margin

Springy Debt instead of a Cash Cushion

The 4% Rule: The Easy Answer to “How Much Do I Need for Retirement?”

The Shockingly Simple Math Behind Early Retirement

Killing your $1000 Grocery Bill

**https://www.mrmoneymustache.com/2011/10/25/the-joy-of-part-time-work/

—not MMM’s but other good articles—

Frequently Asked Questions

Categories
Gitflow Samuel

Gitflow Real World Example

The notes below are from a real world example of updating WordPress core and plugins on a website stored in a repo following the gitflow model. We already went over a test run of updating WordPress in a gitflow repo in our earlier post, if you are new to working with gitflow you should start there.

Clone down a copy of the repo into htdocs

cd /
ls
cd /Applications/MAMP/htdocs
cd /project-folder-name
Git clone git@github.com:user-name/repo-name.git
Now fetch the headers:
Git fetch
Git remote (to see remote branches)

git lfs install (follow steps here if this is the first time doing this, we will need to install this on our system:
https://help.github.com/articles/installing-git-large-file-storage/)

npm install (check for packages.json first, this command will install all the packages listed in in package.json file)

Troubleshoot NPM Install

You will probably get an NPM install message of:
Darwin 14.5.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install"
npm ERR! node v6.11.2
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE

npm ERR! libxmljs@0.14.3 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the libxmljs@0.14.3 install script 'node-gyp rebuild'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the libxmljs package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs libxmljs
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls libxmljs
npm ERR! There is likely additional logging output above.

To fix this were going to run:
Sudo npm cache clean –f
Sudo npm install –g n
Sudo n 4.7.0
Sudo npm install npm –g
Sudo npm uninstall node-gyp –g

Npm install
*Now all packages should install correctly

Source: https://stackoverflow.com/questions/38058386/why-is-node-gyp-rebuild-failing-on-mac-osx-el-capitan/38102743#38102743

Open repo up in source tree and verify that master and dev are in sync

Open SourceTree and create repo from local
Checkout dev branch by clicking odouble-clickinguble clicking dev, or manually run:
Git checkout dev in terminal window
Review the SourceTree graph to confirm branches are in sync

To login to Plesk go to:
https://[[ipaddress]]:8443/
click database > phpmy admin export

Create local copies of the repo and DB and store separately in case of an error/issue
Copy the repo and sql dump file onto desktop

Create the local Database & activate the site to use it

Open gitignore to confirm file name of local DB config file.
Create new config file, usually wp-config.local.php. Copy a standard wp-config file and re-save it as wp-config.local.php

Start MAMP then open up phpmy admin
Create DB, import sql dump file from live, then add information to wp-config.local

Change website URL in wp_options table to use local url in both places (http://localhost:8888/site-name)

Troubleshoot 500 server error

Navigate to localahost:8888/folder-name
If we get this error:
Localhost is currently unable to handle this request. HTTP ERROR 500
Then look in the error log by opening up terminal and typing:
tail -n 20 /Applications/MAMP/logs/php_error.log

It shows us an error of:
[20-Dec-2017 18:37:18 Europe/Berlin] PHP Fatal error: Uncaught Error: Call to undefined function wp() in /Applications/MAMP/htdocs/churchill-mainsite/Churchill-Center-School/wordpress/wp-blog-header.php:16
Stack trace:
#0 /Applications/MAMP/htdocs/churchill-mainsite/Churchill-Center-School/index.php(17): require()

To fix this we need to create a wp-config.local (copy a full WP-config file). The previous one we copied was not a complete file and it was giving us the dreaded white screen of death!

Create New Feature Branch
git checkout -b feature/wp-update dev

Turn Permalinks off to test pages locally:
Go to settings > permalinks and set them to plain (it was on custom, /blog/%postname%/)

Update WordPress
-update core first
-check the plugins page to verify if any plugins are doing major releases (jumping a whole feature number)
-update plugins one by one checking site for errors after each update

Turn Debug on to verify no errors present:
In wp-config.local add define(‘WP_DEBUG’, true);

Commit code to feature branch:
Review code in Sourcetree and confirm which files we would like committed, then commit it to feature branch inside SourceTree.

Merge code to dev branch (submit site for QA testing on Dev)

git checkout dev
git merge feature/wp-update
git push (open source tree and only push dev branch)

**on a release branch we will use:
git merge --no-ff feature/wp-update -m “merge wp-update branch into dev”
git push (open source tree and only push dev branch)

*Submit site for QA then stop here waiting for QA approval*

If QA testing passes, then delete feature branch:
git branch –d feature/wp-update
git push --delete origin feature/wp-update (only if we pushed feature to the repo)

Create new Release Branch from dev branch:
git checkout dev
git checkout -b release/X.X.X (check repo version numbers)

Update readme file in release branch:
# Change version number in package.json and README.md files to line up with new #

Merge from release branch into Master:

*Download a copy of the live site files & DB before proceeding to next step*
git checkout master
git merge --no-ff release/X.X.X -m “merge wp-update branch into development”
git push

Tag merge into Master:

--follow semantic versioning numbers http://semver.org/. IE from 1.0.1 > 1.0.2
git tag -a 1.0.0 –m “updating from wordpress 4.8.1 to 4.8.2”
git push --tags
helpful links on git tagging:
https://git-scm.com/book/en/v2/Git-Basics-Tagging
https://gist.github.com/justinfrench/89712

Merge Release Branch into Dev:
git checkout dev
git merge --no-ff release/X.X.X -m “merge wp-update branch into development”
git push

Delete Release Branch:

git branch –d release-X.X.X
git push –delete origin release-X.X.X (only if this branch has been pushed to the repo)

Categories
Finance Samuel

Kids College Saving Options

Well as some of you may know our family had a huge influx of small children a while back. Planning for how best to send all of these great kids to college can seem somewhat stressful at first, but after a little research, the task reviled itself to be much easier than previously anticipated… in fact it’s even turned into pleasant adventure…. lets do the math.

We figure for each kid we would ideally like to have $80,000 when they turn 18. We set out researching out options and it turns out there are literally hundreds of great companies to choose from here. In our situation going with a 529 college savings plan turned out to be the most beneficial. Obviously for tax reasons, this can vary from person to person, but in general for most people setting up a 529 plan will be the most beneficial. A full outline of our research is below for anyone interested:

Kids College Savings Plans Options

Calculator to show possible returns:
https://www.calcxml.com/calculators/529-college-savings-plan

The plans below are organized in order. I feel that option 1 is the “best” option, but each option below represents a substantial improvement vs just keeping the money in a bank account. So you can’t go “wrong” there are just some differences (mainly tax differences) between each option.

529 Plans:
These plans offer tax free growth, and tax free withdrawals on college related expenses. *The money can only be used for college related expenses, if it is not then a big penalty is paid. I view this as a bonus though because it will force all the kids to use the money on education which is our end goal anyway.

1.) Vanguard 529 Plan
A Vanguard 529 from missourimost.org (most tax benefits for you)
A vanguard 529 directly with vanguard

2.) Wealthfront 529 Plan
3.) Scottrade 529 plan

Traditional Brokerage accounts:
These plans offer more flexibility, the money can be used for anything. The money does not grow tax free though.

4.) Betterment/wealthfront
5.) Vanguard
6.) Scottrade