Skip to content

Instantly share code, notes, and snippets.

View obiora22's full-sized avatar

Obi Anaedozie obiora22

  • Baltimore
View GitHub Profile

SSL upgrades on rubygems.org and RubyInstaller versions

UPDATE 2014-12-21: RubyGems 1.8.30, 2.0.15 and 2.2.3 have been released. It requires manual installation, please see instructions below.


Hello,

If you reached this page, means you've hit this SSL error when trying to

@obiora22
obiora22 / tower.js
Created April 30, 2017 17:04
Implementation of the Tower of Hanoi algorithm.
var hanoi = function (disc, begin, aux, end) {
if (disc > 0) {
hanoi(disc - 1, begin, end, aux)
hanoi(disc - 1, aux, begin, end )
console.log("Move disc " + disc + " from " + begin + " to " + end)
}
}
@obiora22
obiora22 / symmetric_difference.js
Created April 30, 2017 17:07
Finding the symmetric difference between 2 arrays
function sym () {
var args_array = Array.prototype.slice.call(arguments);
var sym_difference;
// function that will select elements that are
// either in array A or array B
// Note that the symmetric difference between 3 sets includes any element present in all 3
function symDiff (array1, array2) {
// This will hold elements unique to either array
var result = [];