Skip to content

Instantly share code, notes, and snippets.

View jzhang729's full-sized avatar

Jordan Zhang jzhang729

View GitHub Profile
@monicao
monicao / notes.md
Last active December 8, 2021 01:51
Setting up your own Ruby Dev Environment on a Mac

Setting up the Ruby dev environment on a Mac

Tested on Yosemite. Should work on El Cap. Message me if it doesn't.

Why would I want to do that?

  • You are tired of using vagrant
  • You want to run guard
  • You want use Sublime plugins (like RSpec or Guard plugins)
  • You want your code to run faster in development
@leimd
leimd / Merge Sort
Created June 24, 2015 00:43
Merge Sort
def mergsort(arr)
return arr if arr.length <= 1
#puts (0..arr.length/2-1) # Left List
#puts (arr.length/2..arr.length-1) #Right List
leftarray = arr[0..arr.length/2-1]
rightarray = arr[arr.length/2..arr.length-1]
#middle = arr[arr.length/2-1]
#arr.each {|value| value < middle ? leftarray << value : rightarray << value}