Skip to content

Instantly share code, notes, and snippets.

View thimo's full-sized avatar
❤️
🏎💨

Thimo Jansen thimo

❤️
🏎💨
View GitHub Profile
date = Time.zone.parse("2023-11-23")
MemberSignup.completed
.where(created_at: date.beginning_of_day..date.end_of_day)
.where("pg_data ->> 'funnel' = ?", "default")
.order(created_at: :asc)
.map { |ms| [ms.created_at.to_s, ms.id, ms.pg_data["funnel"], ms.pg_data["signupConfirmationJson"]["client_id"]] }
.each { |ms| puts ms.to_s } && nil
class TennisGame1
POINTS_NAMES = {
0 => 'Love',
1 => 'Fifteen',
2 => 'Thirty',
3 => 'Forty'
}.freeze
DEUCE = 'Deuce'.freeze
ADVANTAGE = 'Advantage'.freeze
WIN_FOR = 'Win for'.freeze
def ask_question question
print "#{question} "
return gets.chomp
end
def ask_exercise_level
puts "What's your exercise level (1-5)? "
puts ' 1. little or no exercise'
puts ' 2. exercise/sports 1 - 3 times per week'
puts ' 3. exercise/sports 4 - 5 times per week'
# Initialize the pizzas into variables that can be read from anywhere
def initialize_pizzas
@pizza_salami = 4.0
@pizza_quattro_stagioni = 8.5
@pizza_ham_cheese = 6.25
@pizza_shoarma = 7.3
end
# Ask the customer's name and return it
def customer_name