NYC Recommendations
- Tyson Gach: https://foursquare.com/user/11467850
- Phil Oye: https://gist.github.com/philoye/240cf8c2d3636f74ed51
Smorgasburg: foodie market in various locations between April to November. Go hungry!
NYC Recommendations
Smorgasburg: foodie market in various locations between April to November. Go hungry!
class LiveCell | |
TRANSITION_RULES = { | |
2 => LiveCell.new, | |
3 => LiveCell.new, | |
} | |
def next_generation(living_neighbours_count) | |
TRANSITION_RULES.fetch(living_neighbours_count) { DeadCell.new } | |
end | |
end |
# Shakshuka by Gilboa: | |
- Chopped onion | |
- Chopped red capcisum | |
- Chopped tomatoes | |
Fry for a few minutes till soft. Then add: | |
- Tomato paste in garlic or chilli flavour | |
- Crushed garlic | |
- a bit of salt, pepper and sweet paprika | |
Then add the eggs, with either chopped parsley or chopped coriander. |
# Ways to execute a shell script in Ruby | |
# Example Script - Joseph Pecoraro | |
cmd = "echo 'hi'" # Sample string that can be used | |
# 1. Kernel#` - commonly called backticks - `cmd` | |
# This is like many other languages, including bash, PHP, and Perl | |
# Returns the result of the shell command | |
# Docs: http://ruby-doc.org/core/classes/Kernel.html#M001111 |
# config/staging.rb | |
Rails.application.configure do | |
config.middleware.use "::Rack::Auth::Basic" do |u, p| | |
[u, p] == [ENV["BASIC_AUTH_USERNAME"], ENV["BASIC_AUTH_PASSWORD"]] | |
end | |
end | |
# .env | |
BASIC_AUTH_USERNAME = some_value | |
BASIC_AUTH_PASSWORD = some_password |
In one sentence: we are looking for simplicity, readability, and good practices
#Vim Cheat Sheet
gqip
- Reformats paragraph to textwidthgq
- Reformats selection:Tab /=
- Equally spaces based on the = symbol (requires Tabular vim plugin):setf language
- Changes current language:set language=language
- Changes current language<C-a>
- Increments the number under the cursor<C-x>
- Decrements the number under the cursor~
- Toggles case and moves to next character in normal mode# POODR page 28 | |
Wheel = Struct.new(:rim, :tire) | |
def wheelify(data) | |
data.collect {|cell| Wheel.new(cell[0], cell[1])} | |
end | |
# POODR Page 32 | |
class Gear | |
attr_reader :chainring, :cog, :wheel | |
def initialize(chainring, cog, rim, tire) |