Skip to content

Instantly share code, notes, and snippets.

View meesterdude's full-sized avatar
🎯
Building something cool

Russell meesterdude

🎯
Building something cool
View GitHub Profile
@meesterdude
meesterdude / README.md
Last active March 23, 2017 17:42
emoji_spec is a microgem to put emoji in your rspec output.

Emoji Spec

results Tired of the same, dull rspec output? liven it up with some emoji!

Below are the sets presently available, and their corresponding id. if you don't set an ID, one will be randomly chosen every run. Emoji icons may not render in certain terminals.

(pass, fail, pending)

emoji

function elementNamer(element)
{var name = element.nodeName + " class='" + element.className + "' id='" + element.id + "'"return name;};
@meesterdude
meesterdude / gist:403319a079828497bff7c4f52e7451d3
Last active April 30, 2021 09:38
installing handlebars-helpers in ghost
// installing handlebars-helpers for V3 of ghost platform (current as of version 3.37)
// in your ghost install directory, run `yarn add handlebars-helpers` to install the package
// in your project directory of versions/YOUR_VERSION/core/frontend/helpers/index.js
// change L4 to be
// const helpers = require('handlebars-helpers')();
// on production server, edit versions/YOUR_VERSION/node_modules/gscan/lib/spec.js
// remove the method body but keep the theme return value; without this change, themes using custom helpers will fail gscan
@meesterdude
meesterdude / total_pairs.rb
Created January 3, 2022 17:00
problem: find all pairs of numbers in a range of 1..n that add up to n
# $ time ruby total_pairs.rb
# there are 999 pairs that create 2000 between 1 and 2000
# real 0m0.129s
# user 0m0.074s
# sys 0m0.046s
max_size = 2000
numbers = (1..max_size).to_a