Skip to content

Instantly share code, notes, and snippets.

This document has moved!

It's now here, in The Programmer's Compendium. The content is the same as before, but being part of the compendium means that it's actively maintained.

@christiannelson
christiannelson / steps.sh
Last active September 26, 2016 00:10
Opinionated instructions for setting up a laptop for development at Carbon Five. Not intended to be run wholesale; read, interpret, tweak (maybe), then run piece by piece.
# Opinionated instructions for setting up a laptop for development at Carbon Five.
# Not intended to be run wholesale; read, interpret, tweak (maybe), then run piece by piece.
#
# Tested against Yosemite 10.10.
#--------------------------------------
# Install Homebrew.
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
@abelmartin
abelmartin / gist:2203155
Created March 26, 2012 05:18
Alg for Rubyque question #
# For RubyQue question: http://rubeque.com/problems/home-on-the-range
def find_range
min = 0
default_max = 99
max = default_max
goal = 4494
while min <= max
current_sum = (1..100).to_a[min..max].reduce(:+)
if current_sum == 4494