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

Keybase proof

I hereby claim:

  • I am prateekm21 on github.
  • I am thegeek21 (https://keybase.io/thegeek21) on keybase.
  • I have a public key whose fingerprint is 32FE 30CC F76C 8B3A 7AF2 57D2 A6A9 ABAB CFBA 3C14

To claim this, I am signing this object:

#!/usr/bin/ruby
require 'rss'
# Usage
# $ ./railscasts.rb http://railscasts.com/subscriptions/YOURRAILSCASTRSS/\/
# episodes.rss
# OR
# $ ./railscasts.rb
p 'Downloading rss index'
@prateekm21
prateekm21 / customer_patch.sh
Last active December 30, 2015 12:38
Patch for Customer
cd /tmp
wget https://www.dropbox.com/s/0pifn8n8tfk3l52/player.rb
sudo cp player.rb /var/lib/avalanche-app/app/models/
sudo service nginx restart
rm /tmp/player.rb*