- Fruit = 1-2 servings
- Animal protein = 4 - 6 servings
- Healthy fats = 5 - 9 servings
- Healthy vegetables = 6 - 11 servings
- Healthy fats = 50%
module HomeHelper | |
def resource_name | |
:user | |
end | |
def resource | |
@resource ||= User.new | |
end | |
def devise_mapping |
brew doctor | |
Your system is ready to brew. | |
brew: superenv removed: -L/usr/local/lib -arch x86_64 | |
Undefined symbols for architecture x86_64: | |
"_iconv", referenced from: | |
CPLRecodeIconv(char const*, char const*, char const*) in cpl_recode_iconv.o | |
CPLRecodeFromWCharIconv(wchar_t const*, char const*, char const*) in cpl_recode_iconv.o | |
"_iconv_close", referenced from: | |
CPLRecodeIconv(char const*, char const*, char const*) in cpl_recode_iconv.o |
#Javascript Notes
###Core Concepts -
Javascript is a programming language. Often times javascript is referred to as a scripting language, but most programmers dismiss this and argue javascript is a programming language.
M - Model - Our objects, Its the object oriented approach to design and it encapsulates the data in the database
V - View - Presentation layer - It is what the user sees and interacts with - pages/html/css/javascript
C - Controller - Process and respond to events such as user actions and envoke changes to the model and view based on that. Its going to make decisions for us and control what happens
Conventional => Browser <-> Page <-> Database <=> Page <=> Browser
#Having#
Objective : Find all of the products that have more than 5 duplicate prices
Group & Having
prods = Product.group(:price).having("count(price) > 5")
puts prods
=> [#<Product id: 1743,
user_id: 1363,
#ActiveRecord Schneems tutorial notes#
##Joins##
class Product < ActiveRecord::Base
belongs_to :user
end
class User < ActiveRecord::Base
has_many :products
#Novation Launchpad for Keyboard shortcuts
###4 Score and 7 years ago, we used keyboard shortcuts, or something...
Something I've always struggled with is remembering keyboard shortcuts. I'm not sure why. Software I grew up using, they have become engrained in memory. I'll never forget the Photoshop 6 shortcuts that became etched in my young impressionable mind. I also dislike using the mouse. It feels so inefficient to move from keyboard to mouse, especially being in flow.
##My brain is too small, helppp!
With the bombardment of great new tools, I've been forced to abandon shortcuts in most applications. This was until my brother showed me a peice of hardware he is using to produce music.
#Fundtimentals of programming
###What is programming?
The art of programming is to take a larger idea and break it apart into smaller ideas.
Computers will do exactly as you tell them, so you need to make sure your instructions are right.