Skip to content

Instantly share code, notes, and snippets.

View prateekm21's full-sized avatar

Prateek Mehrotra prateekm21

  • San Francisco, CA, USA
View GitHub Profile
@prateekm21
prateekm21 / MergeSort.markdown
Created June 23, 2017 18:26 — forked from bih/MergeSort.markdown
MergeSort Example in Ruby

MergeSort Algorithm in Ruby

When learning about sorting algorithms, I wanted to implement them to help me understand them better. This algorithm was originally invented by John von Neumann in 1948.

The Ruby script attached explains in real code what is going on. Play about with it.

How does the algorithm work?

Step by step:

  • Pass through an array of unsorted numbers (i.e. [4, 3, 2, 10])
@prateekm21
prateekm21 / rabbitmq_conf_homebrew
Created October 1, 2015 21:04 — forked from robcowie/rabbitmq_conf_homebrew
Location of rabbitmq config files with homebrew
Rabbitmq conf locations for homebrew
/usr/local/etc/rabbitmq/rabbitmq-env.conf
/usr/local/etc/rabbitmq/rabbitmq
{TICKET}: Short description
## Status
**READY/IN DEVELOPMENT/HOLD**
## Description
List related PRs against other branches:
branch | PR
#!/usr/bin/ruby
require 'rss'
# Usage
# $ ./railscasts.rb http://railscasts.com/subscriptions/YOURRAILSCASTRSS/\/
# episodes.rss
# OR
# $ ./railscasts.rb
p 'Downloading rss index'