sudo apt-get install git-core
(Ubuntu)brew install git
(OSX)
- git config --global user.name "Your Actual Name"
def self.popular_this_week | |
Podcast. | |
joins(:downloads). | |
select("podcasts.*, COUNT(podcast_id) as download_count"). | |
where("downloads.created_at >= ?", 1.week.ago.utc). | |
group("podcasts.id"). | |
order("download_count DESC") | |
end |
chato
Hope is not a plan
https://gorails.com/setup/osx/10.11-el-capitan (Ruby 2.2.2)
The following document is a written account of the Code School screencasting framework. It should be used as a reference of the accompanying screencast on the topic.
You're probably aren't going to take the time to read this document if you're not interested, but there are a lot of nice side effects caused by learning how to create quality screencasts.
#Some examples with lambdas | |
sum = ->(num_list) { num_list.reduce(:+) } | |
square = ->(number ) { number * number } | |
squares = ->(num_list) { num_list.map {|num| square.(num) } } | |
sum_squares = ->(num_list) { sum.(squares.(num_list)) } | |
square_sum = ->(num_list) { square.(sum.(num_list)) } | |
gem 'minitest' | |
require 'minitest/autorun' |
#include <stdio.h> | |
int is_par(int number); | |
void jogo_par_ou_impar(); | |
void jogo_nim(); | |
int main(int argc, const char * argv[]) { | |
int matricula; | |
int continuar_jogando = 1; | |
# This is a skeleton for testing models including examples of validations, callbacks, | |
# scopes, instance & class methods, associations, and more. | |
# Pick and choose what you want, as all models don't NEED to be tested at this depth. | |
# | |
# I'm always eager to hear new tips & suggestions as I'm still new to testing, | |
# so if you have any, please share! | |
# | |
# @kyletcarlson | |
# | |
# This skeleton also assumes you're using the following gems: |