Skip to content

Instantly share code, notes, and snippets.

Harold Treen haroldtreen

Block or report user

Report or block haroldtreen

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
haroldtreen / hypem-bot.js
Created Oct 31, 2016
Easier downloading from 🎵
View hypem-bot.js
(function() {
function getTracks() {
var tracks = [];
$('.section-player').each(function() {
title: $(this).find('.track_name').text().replace(/\s+/g, ' ').trim() + '.mp3',
url: $(this).find('.dl').find('a').attr('href'),
return tracks;
View HackerRank-CountPairs.js
function getValues(line) {
return line.split(' ').map((i) => Number(i));
function processData(input) {
var lines = input.split('\n');
var inputValues = getValues(lines[0]);
var array = getValues(lines[1]);
fastest(inputValues[0], inputValues[1], array);
haroldtreen / promise-test.js
Last active Jul 14, 2019
Testing promise rejection with Mocha
View promise-test.js
const { assert } = require('chai');
function isError(e) {
if (typeof e === 'string') {
return Promise.reject(new Error(e));
return Promise.resolve(e);
You can’t perform that action at this time.