Skip to content

Instantly share code, notes, and snippets.

@barretts
barretts / caveman-debugging-steps.md
Last active May 3, 2019 19:27
Caveman Debugging Complex Systems

Guide to Caveman Debugging Complex Systems

  • Generally state the issue you want to debug
  • Specifically identify the answer you seek from the debugging
  • List all possible points of failure in the system
  • Identify the minimum components required to debug the issue
  • Remove all possible points of failure not part of the minimum component list
  • Test the issue on this minimum setup. Does it work or not?

If the sytem does not work in the minimum setup you should begin replacing components with others that are known to work.

  • Start by switching out the component in question in this issue with one that works
@barretts
barretts / checklist.md
Last active February 20, 2019 21:36
step by step issue checklist

Yellow warnings are errors, don't ignore them.

You may at any point in the checklist need to backtrack when making code corrections and adjustments.

With all steps write down questions and notes as they arise.

Don't assume the code runs. Test it and be sure it runs.

Gather Intel

  • read the issue
  • re-read the issue making sure you understand every line, note any questions
  • create a list of the features required by this issue (fields, elements, page content)
  • if you have any outstanding questions reach out to clarify your concerns adjusting your list as necessary
@barretts
barretts / blue-dev-cycle.md
Last active September 26, 2018 17:07
Blue Dev cycle

Grab a new issue (ex: #2468) from HuBoard's Next Actions column self assign it and move it to the Development column

Make branch based of the issue number proceeded by x-: git checkout -b x-2468

Finish the issue

Run unit tests: bundle exec rake test:unit

Run interaction tests from Visual Studio

@barretts
barretts / setup-iis.ps1
Created May 17, 2018 16:18
Powershell script to install IIS
Enable-WindowsOptionalFeature -Online -FeatureName IIS-WebServerRole -All
Enable-WindowsOptionalFeature -Online -FeatureName IIS-WebServer -All
Enable-WindowsOptionalFeature -Online -FeatureName IIS-CommonHttpFeatures -All
Enable-WindowsOptionalFeature -Online -FeatureName IIS-StaticContent -All
Enable-WindowsOptionalFeature -Online -FeatureName IIS-DefaultDocument -All
Enable-WindowsOptionalFeature -Online -FeatureName IIS-DirectoryBrowsing -All
Enable-WindowsOptionalFeature -Online -FeatureName IIS-HttpErrors -All
Enable-WindowsOptionalFeature -Online -FeatureName IIS-HttpRedirect -All
Enable-WindowsOptionalFeature -Online -FeatureName IIS-ApplicationDevelopment -All
Enable-WindowsOptionalFeature -Online -FeatureName IIS-ASP -All
Install nodemon
npm install -g nodemon
Copy this file to your $HOME folder
https://gist.github.com/styson/7d56bafc9d1b7fe1ff1d3dd907b7bf0c
run this command from your bash cmd window
@barretts
barretts / Golf Course.less
Created July 11, 2017 16:48
Golf Course Dovetail Agent theme
@import "../agent/a5-theme";
/**
* ____ _ __ ____
* / ___| ___ | |/ _| / ___|___ _ _ _ __ ___ ___
* | | _ / _ \| | |_ | | / _ \| | | | '__/ __|/ _ \
* | |_| | (_) | | _| | |__| (_) | |_| | | \__ \ __/
* \____|\___/|_|_| \____\___/ \__,_|_| |___/\___|
*
*/
@barretts
barretts / Sorting a HEX color swatch palette.js
Last active June 13, 2017 16:27
Sorting a HEX color swatch palette
const coloursArray = ['#ffffff', '#eaeaea', '#666666', '#dddddd', '#c5c5c5', '#f4f4f4', '#000000', '#74cf9b', '#cccccc', '#00a4d6', '#0045b7', '#1c1c1c', '#222222', '#04c04c', '#f9f9f7', '#f89406', '#e5e5e5', '#f5f5f5', '#049cdb', '#a80808', '#5bc0de', '#0077b3', '#3a87ad', '#ee5f5b', '#111111', '#2f96b4', '#040404', '#f3e97a', '#fdf59a', '#46a546', '#149bdf', '#62c462', '#b3b3b3', '#c09853', '#f2f2f2', '#f9f9f9', '#fbb450', '#00286b', '#0480be', '#151515', '#155a95', '#29d29d', '#339bb9', '#444444', '#57a957', '#999999', '#c43c35', '#f3c17a', '#fdd49a', '#ffaa07', '#333333', '#777777', '#bd362f', '#eeeeee', '#ff959f', '#fffac8', '#2d6987', '#356635', '#7ab5d3', '#7aba7b', '#953b39', '#b1f4ce', '#cdf6ff', '#d59392', '#d9edf7', '#dbc59e', '#e6e6e6', '#e8f9ff', '#fcf8e3', '#ff726d', '#002b80', '#007ed2', '#368959', '#36f36f', '#3fb773', '#48c9e2', '#6f8092', '#a47e3c', '#c00c00', '#c18c91', '#c6c6c6', '#efefef', '#f7f7f7', '#0085ad', '#08c08c', '#0d3a5f', '#0e0e0e', '#0e90d2', '#1a1a1a', '#1b1b1b', '#1f6377', '
@barretts
barretts / css-filter-generator-to-convert-from-base-hex-color-to-target-hex-color.markdown
Last active March 26, 2021 09:15
CSS filter generator to convert from black to target hex color
@barretts
barretts / gulp-coverage.js
Created January 17, 2017 17:28
Code coverage sample files
var config = require('config.json');
var fs = require('fs');
var gulp = require('gulp');
var mochaPhantomJS = require('gulp-mocha-phantomjs');
var webpack = require('webpack');
var remapIstanbul = require('remap-istanbul/lib/gulpRemapIstanbul');
var coverageFile = './results/coverage/coverage.json';
gulp.task('webpack-coverage', function (cb) {
@barretts
barretts / npm-install.bat
Created November 17, 2015 03:32
npm install with retry on error from a Windows batch file
:: I created this increase CI/CD stability when running in cloud VMs; npm install failing is such a sad test failure
:: general batch loop thanks @AlexZhidkov https://github.com/FeodorFitsner/BedfordHarbourBOM/blob/master/nuget-restore.cmd
:: pipe npm, search log thanks @Ricky-Brno http://stackoverflow.com/a/22492458/604861
echo off
:: initiate the retry number
set retryNumber=0
set maxRetries=3
:RETRY