Skip to content

Instantly share code, notes, and snippets.

View corywheeler's full-sized avatar

Cory Wheeler corywheeler

View GitHub Profile
@corywheeler
corywheeler / keybase.md
Created December 26, 2020 17:37
Keybase Validation

Keybase proof

I hereby claim:

  • I am corywheeler on github.
  • I am corywheeler (https://keybase.io/corywheeler) on keybase.
  • I have a public key ASA4AK-YczYZ3T-FL9a7TXGAvxvWV-qo524xHBr1xei66Qo

To claim this, I am signing this object:

@corywheeler
corywheeler / nineTofive.md
Last active April 24, 2023 19:43
Workin 9 to 5

What is this?

I wanted a way to see when commits are being made, specifically commits being made during non-business hours when people should be resting and enjoying their lives rather than working... we all work enough, no need to work when you shouldn't be.

Running this on your git command line will tell you how many commits were made between two certain dates outside of "business hours".

This assumes "business hours" to be any time between 8am and 6pm. I realize this is not 9am to 5pm, as the gist would suggest. I did this to make some account for those that come in a little earlier to get started (and hopefully leaving a little earlier), or those that stay a little later (and hopefully comming in a little later). It will also count any commits made on the weekends.

These were the "business hours" that my company operated on. If you would like to adjust the hours this works on, then adjust the hours used in the awk section.

If you would like to adjust the dates that this looks at, simply fill in y

@corywheeler
corywheeler / TestHelper.cs
Created February 17, 2019 04:13 — forked from haacked/TestHelper.cs
String Comparison Unit Test Helper
public static class TestHelpers
{
public static void ShouldEqualWithDiff(this string actualValue, string expectedValue)
{
ShouldEqualWithDiff(actualValue, expectedValue, DiffStyle.Full, Console.Out);
}
public static void ShouldEqualWithDiff(this string actualValue, string expectedValue, DiffStyle diffStyle)
{
ShouldEqualWithDiff(actualValue, expectedValue, diffStyle, Console.Out);
@corywheeler
corywheeler / zom.rb
Created January 13, 2017 14:41 — forked from michaelfeathers/zom.rb
Find the number of calls in Ruby code that have happened no times, just once, or many times.
require 'set'
require 'find'
require 'ap'
class Array
def to_h; Hash[self]; end
def to_s; Set.new(self); end
def freq; group_by {|e| e }.map {|k,v| [k,v.count] }.to_h; end
end
@corywheeler
corywheeler / mocha-before-and-beforeEach-lifecycles.js
Created December 12, 2014 17:14
Show the order of execution of mocha's before and beforeEach hooks for each describe and each test
describe('highest level describe', function () {
before(function() {
console.log('This is the highest level before')
})
beforeEach(function() {
console.log('This is the highest level beforeEach')
})
it('This is the first highest level test', function() {