![CJ Avilla](/img/default-banner.jpg)
- 337
- 698 165
CJ Avilla
United States
Приєднався 21 сер 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
Переглядів: 476
Відео
Basic Posthog API integration - Add A Feature
Переглядів 5646 місяців тому
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
Переглядів 3556 місяців тому
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
Переглядів 1726 місяців тому
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
Переглядів 1487 місяців тому
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
Переглядів 927 місяців тому
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
Переглядів 1457 місяців тому
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
Переглядів 1117 місяців тому
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
Переглядів 2647 місяців тому
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
Переглядів 2287 місяців тому
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
Переглядів 2257 місяців тому
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
Переглядів 1477 місяців тому
each_cons, and layers 🎂 - Day 09 - Advent of Code 2023
lcm, rotate!, and modulo - Day 08 - Advent of Code 2023
Переглядів 2067 місяців тому
lcm, rotate!, and modulo - Day 08 - Advent of Code 2023
Spaceship operator - Day 07 - Advent of Code 2023
Переглядів 2387 місяців тому
Spaceship operator - Day 07 - Advent of Code 2023
Percent delimiters %w, zip - Day 06 - Advent of Code 2023
Переглядів 1717 місяців тому
Percent delimiters %w, zip - Day 06 - Advent of Code 2023
Range overlap and intersection - Day 05 - Advent of Code
Переглядів 4017 місяців тому
Range overlap and intersection - Day 05 - Advent of Code
Rightward Assignment in Ruby - Day 04 - Advent of Code 2023
Переглядів 4017 місяців тому
Rightward Assignment in Ruby - Day 04 - Advent of Code 2023
Grid of Characters - Day 03 - Advent of Code 2023
Переглядів 4737 місяців тому
Grid of Characters - Day 03 - Advent of Code 2023
Pattern matching with Ranges - Day 02 - Advent of Code 2023
Переглядів 4587 місяців тому
Pattern matching with Ranges - Day 02 - Advent of Code 2023
Match and Scan - Day 01 - Advent of Code 2023
Переглядів 8667 місяців тому
Match and Scan - Day 01 - Advent of Code 2023
Jupyter with Ruby and Rails (plus OpenAI function calling)
Переглядів 8208 місяців тому
Jupyter with Ruby and Rails (plus OpenAI function calling)
Chatbot with Ruby on Rails, Turbo Streams, and OpenAI
Переглядів 3,2 тис.8 місяців тому
Chatbot with Ruby on Rails, Turbo Streams, and OpenAI
Semantic search (search by meaning) - Rails, OpenAI, langchain.rb, pg_vector
Переглядів 2,3 тис.9 місяців тому
Semantic search (search by meaning) - Rails, OpenAI, langchain.rb, pg_vector
Sales Handoff - Hacking on a handoff process from sales to operations
Переглядів 3819 місяців тому
Sales Handoff - Hacking on a handoff process from sales to operations
Image upload for markdown input with Stimulus and ActiveStorage
Переглядів 1,2 тис.Рік тому
Image upload for markdown input with Stimulus and ActiveStorage
Using pinecone vector db from Rails with OpenAI for semantic search
Переглядів 2,1 тис.Рік тому
Using pinecone vector db from Rails with OpenAI for semantic search
Recursively summarize blog posts with OpenAI and Ruby on Rails
Переглядів 1,4 тис.Рік тому
Recursively summarize blog posts with OpenAI and Ruby on Rails
Monkey Math evaluating expressions - Advent of Code 2022 day 21 with Ruby
Переглядів 303Рік тому
Monkey Math evaluating expressions - Advent of Code 2022 day 21 with Ruby
This video is amazing, thank you! Chucked you a follow on twitter as well :)
Wonder what are neat and open web-hooks to play with!
it really really help man ! nice and pedagogical ! i apreciate, thanks a lot from Lyon in France !
When we look for videos for some help, we want these! What an amazing indepth video. I learned tons!
Thanks for watching!
Very helpful, thank you!
The best part about Ruby on Rails is that when I build something for a client, he’s better off staying with me because it is hard to find RoR devs. It’s my craftsmanship.
thanks man!
I do Rails, cause I enjoy it❤🌺
Can you PLEASE do more tutorials on Ruby? It's harder to find YT creators that are Ruby Developers to learn best practices from.
I think there is an issue here. When you are trying to pass a lambda to the 'each' method. The '&' symbol is converting the lambda into the proc on passing vars to the method.
Awesome!
Please tell me that Rails will not die in the next 5 years.
Thanks CJ🎉🎉
“Is ruby on rails fast, well its fast enough for apps that you would build in ruby on rails” ermmm 🫠 P.s. i do agree.
am new here and it seems lectures are pretty awesome thanks
Amazing explanation!!!!!!! Thank you so much for such videos from Paris 😃😄
Is there a way to know where do dependencies that aren’t causing issues come from? For example if I use angular is there a way for the dependabot to tell me these dependencies are being included cause of angular?
I love you man
Love you man
Much appreciated! Just what I was looking for.
Thanks for this video dude!
CJ (Christopher James?), you are truly the best. An outstanding educator. You teach us exactly what we need to learn: how to navigate through even the most abundant documentation, which is an art in itself. An art that you share exceptionally well, illustrating it wonderfully. Your teaching methods are excellent, and you are an excellent teacher (and this comes from someone who loves pedagogy, saying this with joy). Thank you for everything, from France.
Wow this made my day. Thanks for the kind words!
Thanks buddy , Helped a lot!!!!
Just one question, you didn't change the config.load_defaults to 7.0, do you have a video about loading the new configs by default and getting rid of the new_framework_defaults_7_0.rb file
Perfect content. thank you!
Cyan is pronounced "sigh-ann' (Cyan, magenta and yellow are the primary subtractive colors, used in printing, my former trade). Thanks for all your great tutorials!
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 🙏🙏