- 337
- 664 227
CJ Avilla
United States
Registrace 21. 08. 2013
Hey! I'm CJ Avilla and I help beginner and mid-level web developers learn how to build web applications and API integrations. If you're just getting started or are looking for some specific API integration examples, you're in a great place.
On this channel you'll find content for learning how to program, computer science fundamentals, and how to work with APIs. Sometimes my sons and I livestream building games.
Most content is a mix of several programming languages like ruby, javascript, python, php, go, c#. We'll also play with different frameworks like React and Angular.
On this channel you'll find content for learning how to program, computer science fundamentals, and how to work with APIs. Sometimes my sons and I livestream building games.
Most content is a mix of several programming languages like ruby, javascript, python, php, go, c#. We'll also play with different frameworks like React and Angular.
BCrypt Password basics in Ruby
This video explains how to use the Bcrypt password class in Ruby to securely hash and store passwords. We'll look at how a user's encrypted password is stored in the database as a hashed string that can't be reversed. To check if a password matches, you initialize a Bcrypt::Password object with the hashed password, then compare it to a plain text password using the == operator, which Bcrypt overrides to check if the hashes match.
Bcrypt handles salting and key stretching internally to make brute force attacks harder. When creating a hash, Bcrypt takes time to run its key derivation function, which can be configured by increasing the cost parameter. We'll look at how to check properties of a bcrypt password like cost, version, and valid hash.
Overall, bcrypt provides a simple interface in Ruby for securely hashing passwords. By storing the bcrypt password hashes rather than plain text passwords, the passwords are securely encrypted at rest in the database. Bcrypt is an industry-standard for password hashing.
#rubyonrails #ruby #rails
Bcrypt handles salting and key stretching internally to make brute force attacks harder. When creating a hash, Bcrypt takes time to run its key derivation function, which can be configured by increasing the cost parameter. We'll look at how to check properties of a bcrypt password like cost, version, and valid hash.
Overall, bcrypt provides a simple interface in Ruby for securely hashing passwords. By storing the bcrypt password hashes rather than plain text passwords, the passwords are securely encrypted at rest in the database. Bcrypt is an industry-standard for password hashing.
#rubyonrails #ruby #rails
zhlédnutí: 391
Video
Basic Posthog API integration - Add A Feature
zhlédnutí 483Před 4 měsíci
In this video, we'll work on a feature to integrate PostHog analytics into the Craftwork web application. We create a Rails model to store marketing attribution data from PostHog called TrafficSource. The job fetches session data from the PostHog API, parses it, and stores relevant marketing metadata like UTM parameters, click IDs, referrers etc. in the TrafficSource model. Tests are written to...
Shoelace, Pick, and Enumerators - Day 18 - Advent of Code 2023
zhlédnutí 320Před 4 měsíci
In this Advent of Code 2023 video, you’ll learn how to solve the "Lava Duct Lagoon" puzzle from Day 18. We walk through calculating the area of a complex polygon shape based on a set of digging instructions. The key techniques and concepts covered are: - Parsing direction, step count, and color instructions - Visualizing the polygon by drawing it on a grid - Applying the Shoelace Formula to cal...
Heaps of fun with shortest paths - Day 17 - Advent of Code 2023
zhlédnutí 155Před 4 měsíci
In this episode you'll learn how to solve day 17's "Clumsy Crucible" puzzle. We walk through implementing a shortest path algorithm to find the route through a grid-based map with the lowest "heat loss". Using a greedy approach to explore minimum heat paths first Implementing a visited set to avoid exploring already visited states Switching from arrays to a heap data structure for faster state ...
grid traversal with pattern matching - Day 16 - Advent of Code 2023
zhlédnutí 135Před 4 měsíci
In this episode of the Advent of Code 2023 solutions series, we tackle day 16, The Floor Is Lava, using Ruby. We start by examining the puzzle input, representing a contraption through which a beam of light travels. The beam interacts with different components like mirrors, splitters, empty spaces, etc. Our goal is to follow the path of the beam and count the number of "energized" tiles it trav...
ASCII values with ord and delete_if - Day 15 - Advent of Code 2023
zhlédnutí 90Před 4 měsíci
In this video, you’ll learn how to solve day 15 of the Advent of Code 2023. The first part involves writing a hash function to convert initialization sequences like "rn=1" into decimal values between 0-255. The hash function works by: 1. Getting the ASCII code for each character using .ord 2. Multiplying the current value by 17 3. Taking modulo 256 to get the final hash value For part 2, the in...
transpose, reverse, roll! - Day 14 - Advent of Code 2023
zhlédnutí 141Před 4 měsíci
In this video, you’ll see how to solve Day 14 for the Advent of Code 2023 Part 1 and Part 2. The puzzle involves manipulating a grid representing a panel with rocks on it. The goal is to tilt the panel north, south, east and west to get the round rocks to roll around. In Part 1, we’ll write a "roll" method to move the round rocks on a single row all the way to the left by swapping spaces. Then ...
partition and inject intersection &:& 👯♂️ - Day 13 - Advent of Code 2023
zhlédnutí 109Před 4 měsíci
In this episode, we solve day 13 of Advent of Code 2023, called "Point of Incidence", where we're trying to find lines of symmetry in patterns of dots and pound signs representing mirrors on Lava Island. First, we parse the input into arrays of character arrays representing each pattern. Then we write some methods to check if a line is symmetrical around a given point, find all points of symmet...
Caching and Pattern matching - Day 12 - Advent of Code
zhlédnutí 255Před 4 měsíci
In this episode, we walk through solving day 12 of Advent of Code 2023, called "Hot Springs". The challenge involves parsing records of hot springs, some of which are damaged (#) or operational (.), along with checksums indicating groups of damaged springs. First, we set up some test cases and write a parse method to process the input. Then we implement a count method using recursion and patter...
combination, filter_map - Day 11 - Advent of Code
zhlédnutí 219Před 4 měsíci
Join me as we traverse the cosmos while solving Day 11 of Advent of Code 2023 - Cosmic Expansion - in Ruby! In this coding galaxy quest, we'll: Parse an image grid of galaxies and empty space Expand the grid by inserting extra rows and columns Find all galaxy locations and calculate distances Generate combinations of galaxies to compare Refactor distance to handle cosmic doubling Scale empty sp...
Point in polygon - Day 10 - Advent of Code
zhlédnutí 219Před 4 měsíci
Join me to solve Day 10 of Advent of Code 2023 - The Pipe Maze - in Ruby! In this coding challenge, we'll navigate a grid map of different pipe connections to: Parse the input grid data Find starting points and valid neighbors Traverse around the pipe loop to map its path Determine enclosed tiles inside the loop Use raycasting logic to count wall intersections Handle tricky cases like squeezed ...
each_cons, and layers 🎂 - Day 09 - Advent of Code 2023
zhlédnutí 145Před 4 měsíci
each_cons, and layers 🎂 - Day 09 - Advent of Code 2023
lcm, rotate!, and modulo - Day 08 - Advent of Code 2023
zhlédnutí 201Před 5 měsíci
lcm, rotate!, and modulo - Day 08 - Advent of Code 2023
Spaceship operator - Day 07 - Advent of Code 2023
zhlédnutí 231Před 5 měsíci
Spaceship operator - Day 07 - Advent of Code 2023
Percent delimiters %w, zip - Day 06 - Advent of Code 2023
zhlédnutí 167Před 5 měsíci
Percent delimiters %w, zip - Day 06 - Advent of Code 2023
Range overlap and intersection - Day 05 - Advent of Code
zhlédnutí 397Před 5 měsíci
Range overlap and intersection - Day 05 - Advent of Code
Rightward Assignment in Ruby - Day 04 - Advent of Code 2023
zhlédnutí 397Před 5 měsíci
Rightward Assignment in Ruby - Day 04 - Advent of Code 2023
Grid of Characters - Day 03 - Advent of Code 2023
zhlédnutí 465Před 5 měsíci
Grid of Characters - Day 03 - Advent of Code 2023
Pattern matching with Ranges - Day 02 - Advent of Code 2023
zhlédnutí 449Před 5 měsíci
Pattern matching with Ranges - Day 02 - Advent of Code 2023
Match and Scan - Day 01 - Advent of Code 2023
zhlédnutí 843Před 5 měsíci
Match and Scan - Day 01 - Advent of Code 2023
Jupyter with Ruby and Rails (plus OpenAI function calling)
zhlédnutí 757Před 5 měsíci
Jupyter with Ruby and Rails (plus OpenAI function calling)
Chatbot with Ruby on Rails, Turbo Streams, and OpenAI
zhlédnutí 2,8KPřed 6 měsíci
Chatbot with Ruby on Rails, Turbo Streams, and OpenAI
Semantic search (search by meaning) - Rails, OpenAI, langchain.rb, pg_vector
zhlédnutí 2KPřed 6 měsíci
Semantic search (search by meaning) - Rails, OpenAI, langchain.rb, pg_vector
Sales Handoff - Hacking on a handoff process from sales to operations
zhlédnutí 371Před 7 měsíci
Sales Handoff - Hacking on a handoff process from sales to operations
Image upload for markdown input with Stimulus and ActiveStorage
zhlédnutí 1,1KPřed rokem
Image upload for markdown input with Stimulus and ActiveStorage
Using pinecone vector db from Rails with OpenAI for semantic search
zhlédnutí 2KPřed rokem
Using pinecone vector db from Rails with OpenAI for semantic search
Recursively summarize blog posts with OpenAI and Ruby on Rails
zhlédnutí 1,4KPřed rokem
Recursively summarize blog posts with OpenAI and Ruby on Rails
Monkey Math evaluating expressions - Advent of Code 2022 day 21 with Ruby
zhlédnutí 299Před rokem
Monkey Math evaluating expressions - Advent of Code 2022 day 21 with Ruby
And all - of this: "Be static only!" On Radar - Oriental Tribal! You cannot - use index - i.e. static! I.e. -- < body f(mx'')> I tried bellow - i.e. i R'' -- index Reactant - 2nd derivative + v8''(velocity)! And DOC -- Oriental MD!
ATTN: "68' -- SAN BN CLAIBORNE- ACT!" Ban on - "Child birth!" From: "68' till 90s!" U weren't, born - in 68' -- 90s! Vet Viet = Beat nick -- Sheriff Deputies - Nat Grd - US ABN - Coast GRd! --GUATEMALA -- GUDZ - not Samoan! -- US really - screwed up - Hindoo nazi! I.e. Hisraelerz - i.e. Israel
/i R''(v8'')~tmp <body f(mx'')> [2'h=chutz : yxz=h2'' fiji ops]/ /< 2'kf''~tmp(vk8'') zX''|pn|~rul chkz body~tmp wrd art/ /4'fz sfr mch abv~tmp crdt LN'' skor~tmp R2'' ext D''/ /cntr LN''~tmp wrd art f(mcx''T'(2''t)n'') rul body~chutz/ /i.e. fz 68' wn lim r'' eml~tmp abv chutz || fiji ops/
Can I use action mailbox for google?
Rails team really need to improve active record, except this issue Ruby is faster than people think
Is there any github with code?
Thanks so much for this series of videos, learning a lot here !
thanks dude, very helpful
CJ, How does Zillow "remember" drawn boundary polygons? I see Lat/long for NSEW, but nothing else? Is it possible to find that out?
Why is it not even used!? I see vue.js to be more popular for example. Even java's spring is more used.
before_save callback seems to be not really recommanded, do you suggest another way to achieve what you did ? Thanks
Simple and clear, thanks a ton.
Thank you so much for this series!
but why i cant just do this? require 'bcrypt' hash = BCrypt::Password.create("1234") puts "Hash: #{hash}" if hash == "1234" puts "correct " else puts "incorrect" end
So you have a repo with this examples?
Why is it taking several seconds to run the test?
Good job man you like actually saved my life (i got an exam tomorrow...)
I was looking for exactly this piece of JS and C# code behind for WebForms. It is just not easy to read Stripe documentation and write all this. It really really helped a great deal. Thanks!
"Is Ruby on Rails dead? The answer is .." *scrolls*
It's 2023 and this still remains VERY relevant. Developers seem to forget that there is a TON of legacy .NET Framework 4.8 and earlier code that is still reliable, running and in production, and will be probably for another 10-15 years entirely as-is with no plans to "upgrade". So if developers suggest STRIPE as an alternative, but there's no good sample code for implementing it, they will have to move on to something else. This was great, but you skipped how to handle the results.
Your videos are amazing, but something that I'm really jealous of is your control of Vim...
keep going
Thank you CJ!! all your videos are very helpfull 🙏🙏
Hey I'm excited to work through this playlist. Thanks for putting this together. I'm sure it will become clear later, but I'm wondering why you chose to have a database backed version of your videos at all. It seems like it would make more sense for your models to just be POROs that are just backed by API calls. Will keep watching!
Thank you so much !!! amazing the first one explain stripe step by step, i like all your videos , i have learn a lot from you , thanks again CJ!
Thanks for watching! Glad to hear it was useful.
A great video, thank you so much.
This is a brilliant tutorial! You deserve more views
you deserve more appreciation bro. keep the good work up.
Hey really liked the video, but being an editor i can confidently say there's a room for improvement like titles are not discoverable, the thumbnails and content could be made more engaging postproduction, if you feel there's something that we can about, then i open to reading your reply)
Hello! Is it worth learning Ruby in 2024?
More than ever
@cjav_dev thank you!
Great video, thanks!
I stumbled upon this playlist while searching (for longer than I care to admit) for an approach to trigger the stimulus controller actions precisely in this way. Your video saved me valuable time, thanks a lot pal!
HI, excellent presentation. Can you mention the repository link in the description?
wow, I never heard of 'lcm' before your video. Great idea.
Thanks for sharing
Nice video. Thanks. One question I'm impressed with is your VIM setup for rails. Is that NeoVim? Where can I find a guide to configure it that way for Mac? Thanks again.
use Arc
Thanks for what you're doing CJ, I'm a beginner with Ruby, but when I watch your videos, it motivates me to think that one day I'll be able to reach your level. From DRC
Thanks for watching, Joseph! You can totally do it.
This was really helpful - thanks CJ!
@cj is it possible to use turbo_frames to replace the reply form with the reply button for nested comments!. i have tried it but the state is lost for deep nesting.
Wow this google really makes things crazy hard but you explained it well. Also loved how you don't skip the parts that you are trying to figure out yourself. Loved to see how you debug things and work things out. Thanks you so much!
Thanks for clarifying so well haha it’s literally to the point of HTML for dummies😂
Hey There! Thanks sir you've helped me a lot. keep forward!
I did both parts but part2 is so slow for ruby! It takes 25 hours to complete xD who invented those task is crazy
This is such a great video, thank you! I’ve been interested in stripe for quite a while now and have been pretty intimidated/overwhelmed by the integration. Huge fan of Remix, and you showed it to be much easier than I expected 😃🙏
Ey Appreciated this kind of short and digestable videos. this is what I actually looking. I stumble here because I searched.
I also looped the video.
excellent job explaining this. Thanks!
Thanks for you explanation! It's very clear and specific.