Skip to content

Instantly share code, notes, and snippets.

@tomelm
tomelm / gist:3955122
Created October 25, 2012 20:13
Chocolate Banana Bread Pudding for skalnik
Ingredients:
* 4 cups cubed french bread (get something nice, fresh and tasty!)
* 4 eggs
* 2 cups milk
* 1 cup white sugar
* 1 tbl spoon vanilla extract
* 2 bananas, sliced (optional)
* 1 cup semi-sweet chocolate chips (optional)
Steps:
@tomelm
tomelm / gist:3776030
Created September 24, 2012 13:44
Ruby version of Jesse's n way merge from Java
def n_way_merge(arrays, chunks, chunk_size, new_array)
indices = []
(0..chunk_size-1).each_with_index do |n,i|
min = (1..chunks).select { |j|
indices[j] < chunk_size && arrays[chunk_size * j + indices[j]] < arrays[chunk_size * min + indices[min]]
}.first
new_array[i] = arrays[chunk_size * min + indices[min]]
indices[min] += 1
end
@tomelm
tomelm / gist:3772915
Created September 23, 2012 20:16
rails presentation outline for skalnik
  • linux users make sure you have sqlite3 and libsqlite3-dev
  • gem install rails
  • why rails?
  • github's on rail!
  • rails new
  • generates a shit ton of file, the fuck is all that for?
  • primarily going to be concerned with app/ and config/
  • routes
  • app/ => MVC
  • models
@tomelm
tomelm / gist:3334944
Created August 12, 2012 22:27
colors for skalnik!
#F18D05 - vibrant
#ED9936 - vibrant kind of muted
#192A44 - dark muted
#CBC5AF - light muted
#B1B9AC - light muted 2
#EFFFFF - light kind of muted kind of vibrant?
#334455 - dark muted
#FF4422 - vibrant kind of muted