Skip to content

Instantly share code, notes, and snippets.

I upgraded to El Capitan, with Homebrew & Ruby, and this is how I did it flawlessly.

... and Xcode and Java, etc.

Prepare

If you don't already have homebrew installed, do that first, so you don't have to deal with SIP issues. Install all Software Updates available in the Apple Menu, up to and including El Capitan.

Hardware

@kexline4710
kexline4710 / Mander Pitches
Created November 20, 2013 12:46
Rather than keeping our pitch ideas cooped up and only sharing them on pitch day, several of us pitched our (mostly loose) ideas last night and got feedback from our peers. Add more thoughts, ideas, and resources to the comments! We can get a discussion going, and help each other develop some awesome pitches!
- Crime Prediction App (Nathan)
- Crowdsourced Birthday Drink App (Ty)
- Clinical Trial Patient Web App (Katy)
- Annotate & Collect Links, maybe by categories (Meara)
- Real Talk Conversations (Chirag)
- Gunshot triangulation - mimicking data (Nathan)
- If you have a bad day, see Nathan's face app (Ty)
- Recreate AIM with the sound effects and look (Katy)
- Secure chat (Nathan)
- Visualize the tools/gems/languages in your github project (Katy)
@parksilk
parksilk / array_mode.rb
Last active June 20, 2018 20:52
Exercise: Calculating the array mode: Write a method "mode" which takes an Array of numbers as its input and returns an Array of the most frequent values. If there's only one most-frequent value, it returns a single-element Array. For example, mode([1,2,3,3]) # => [3] mode([4.5, 0, 0]) # => [0] mode([1.5, -1, 1, 1.5]) # => [1.5] mode([1,1,2,2]) …
def mode(array)
counter = Hash.new(0)
# this creates a new, empty hash with no keys, but makes all defalt values zero. it will be used to store
# the information from the array, such that the keys will be each unique number from the array (IOW, if there
# are two or more 4's in the array, there will just be one key that is a 4), and the value for each key will
# be the number of times that integer appears in the array.
array.each do |i|
counter[i] += 1
end
# this interates throught the array, and for each element it creates a key for that integer (if it hasn't been
@zhengjia
zhengjia / capybara cheat sheet
Created June 7, 2010 01:35
capybara cheat sheet
=Navigating=
visit('/projects')
visit(post_comments_path(post))
=Clicking links and buttons=
click_link('id-of-link')
click_link('Link Text')
click_button('Save')
click('Link Text') # Click either a link or a button
click('Button Value')