CJ Avilla
CJ Avilla
  • Видео 337
  • Просмотров 707 652
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 ...
Просмотров: 506

Видео

Basic Posthog API integration - Add A Feature
Просмотров 5867 месяцев назад
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
Просмотров 3677 месяцев назад
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
Просмотров 1777 месяцев назад
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
Просмотров 1497 месяцев назад
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
Просмотров 937 месяцев назад
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
Просмотров 1477 месяцев назад
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
Просмотров 1137 месяцев назад
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
Просмотров 2707 месяцев назад
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
Просмотров 2077 месяцев назад
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
Просмотров 1728 месяцев назад
Percent delimiters %w, zip - Day 06 - Advent of Code 2023
Range overlap and intersection - Day 05 - Advent of Code
Просмотров 4038 месяцев назад
Range overlap and intersection - Day 05 - Advent of Code
Rightward Assignment in Ruby - Day 04 - Advent of Code 2023
Просмотров 4018 месяцев назад
Rightward Assignment in Ruby - Day 04 - Advent of Code 2023
Grid of Characters - Day 03 - Advent of Code 2023
Просмотров 4738 месяцев назад
Grid of Characters - Day 03 - Advent of Code 2023
Pattern matching with Ranges - Day 02 - Advent of Code 2023
Просмотров 4588 месяцев назад
Pattern matching with Ranges - Day 02 - Advent of Code 2023
Match and Scan - Day 01 - Advent of Code 2023
Просмотров 8728 месяцев назад
Match and Scan - Day 01 - Advent of Code 2023
Jupyter with Ruby and Rails (plus OpenAI function calling)
Просмотров 8518 месяцев назад
Jupyter with Ruby and Rails (plus OpenAI function calling)
Chatbot with Ruby on Rails, Turbo Streams, and OpenAI
Просмотров 3,4 тыс.9 месяцев назад
Chatbot with Ruby on Rails, Turbo Streams, and OpenAI
Semantic search (search by meaning) - Rails, OpenAI, langchain.rb, pg_vector
Просмотров 2,4 тыс.9 месяцев назад
Semantic search (search by meaning) - Rails, OpenAI, langchain.rb, pg_vector
Fun with Rails Generators
Просмотров 85010 месяцев назад
Fun with Rails Generators
Sales Handoff - Hacking on a handoff process from sales to operations
Просмотров 38310 месяцев назад
Sales Handoff - Hacking on a handoff process from sales to operations
Rails Performance Tips and Tricks
Просмотров 2,4 тыс.10 месяцев назад
Rails Performance Tips and Tricks
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

Комментарии

  • @venusMessiah
    @venusMessiah 14 дней назад

    hello, i need your help with paypal and klarna payment through stripe. do you know how i should connect my paypal and klarna Apis to stripe Apikey? i appreciate your respond. kind regards

  • @prajitlal562
    @prajitlal562 21 день назад

    This video is amazing, thank you! Chucked you a follow on twitter as well :)

  • @KidUncommon
    @KidUncommon 23 дня назад

    Wonder what are neat and open web-hooks to play with!

  • @vincentbonnier9333
    @vincentbonnier9333 24 дня назад

    it really really help man ! nice and pedagogical ! i apreciate, thanks a lot from Lyon in France !

  • @barelycodingtoday
    @barelycodingtoday 26 дней назад

    When we look for videos for some help, we want these! What an amazing indepth video. I learned tons!

    • @cjav_dev
      @cjav_dev 26 дней назад

      Thanks for watching!

  • @baylorpate2357
    @baylorpate2357 27 дней назад

    Very helpful, thank you!

  • @haniqassim
    @haniqassim Месяц назад

    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.

  • @streambtsalishacruz2860
    @streambtsalishacruz2860 Месяц назад

    thanks man!

  • @geekychunk
    @geekychunk Месяц назад

    I do Rails, cause I enjoy it❤🌺

  • @djlclopez128
    @djlclopez128 Месяц назад

    Can you PLEASE do more tutorials on Ruby? It's harder to find YT creators that are Ruby Developers to learn best practices from.

  • @SCBiscuit13
    @SCBiscuit13 Месяц назад

    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.

  • @eduardomaes
    @eduardomaes Месяц назад

    Awesome!

  • @shashankkestwal4454
    @shashankkestwal4454 Месяц назад

    Please tell me that Rails will not die in the next 5 years.

  • @RiansyahTohamba
    @RiansyahTohamba Месяц назад

    Thanks CJ🎉🎉

  • @nuttygold5952
    @nuttygold5952 2 месяца назад

    “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.

  • @andrewbanfro2143
    @andrewbanfro2143 2 месяца назад

    am new here and it seems lectures are pretty awesome thanks

  • @mikapp802
    @mikapp802 2 месяца назад

    Amazing explanation!!!!!!! Thank you so much for such videos from Paris 😃😄

  • @daveanvs
    @daveanvs 2 месяца назад

    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?

  • @3i33i
    @3i33i 2 месяца назад

    I love you man

  • @3i33i
    @3i33i 2 месяца назад

    Love you man

  • @terencewehle4472
    @terencewehle4472 2 месяца назад

    Much appreciated! Just what I was looking for.

  • @bobcekaymusic
    @bobcekaymusic 2 месяца назад

    Thanks for this video dude!

  • @phil-icare
    @phil-icare 2 месяца назад

    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.

    • @cjav_dev
      @cjav_dev 2 месяца назад

      Wow this made my day. Thanks for the kind words!

  • @Aman-vu9wm
    @Aman-vu9wm 2 месяца назад

    Thanks buddy , Helped a lot!!!!

  • @mgharbik
    @mgharbik 2 месяца назад

    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

  • @salma_techie
    @salma_techie 2 месяца назад

    Perfect content. thank you!

  • @thomasconnolly8201
    @thomasconnolly8201 2 месяца назад

    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!

  • @paulhetherington3854
    @paulhetherington3854 3 месяца назад

    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!

  • @paulhetherington3854
    @paulhetherington3854 3 месяца назад

    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

  • @paulhetherington3854
    @paulhetherington3854 3 месяца назад

    /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/

  • @ahmadzaheer8757
    @ahmadzaheer8757 3 месяца назад

    Can I use action mailbox for google?

  • @taab84
    @taab84 3 месяца назад

    Rails team really need to improve active record, except this issue Ruby is faster than people think

  • @piotrekdabrowski7516
    @piotrekdabrowski7516 3 месяца назад

    Is there any github with code?

  • @sargaaaifyful
    @sargaaaifyful 3 месяца назад

    Thanks so much for this series of videos, learning a lot here !

  • @mattfoulgerBC
    @mattfoulgerBC 3 месяца назад

    thanks dude, very helpful

  • @meederr
    @meederr 3 месяца назад

    CJ, How does Zillow "remember" drawn boundary polygons? I see Lat/long for NSEW, but nothing else? Is it possible to find that out?

  • @mariobroselli3642
    @mariobroselli3642 4 месяца назад

    Why is it not even used!? I see vue.js to be more popular for example. Even java's spring is more used.

  • @RafikD.
    @RafikD. 4 месяца назад

    before_save callback seems to be not really recommanded, do you suggest another way to achieve what you did ? Thanks

  • @cmthimmaiah
    @cmthimmaiah 4 месяца назад

    Simple and clear, thanks a ton.

  • @japanesewithnana
    @japanesewithnana 4 месяца назад

    Thank you so much for this series!

  • @lucazefferi5881
    @lucazefferi5881 4 месяца назад

    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

  • @alexanonym1584
    @alexanonym1584 4 месяца назад

    So you have a repo with this examples?

  • @joshsantos9536
    @joshsantos9536 4 месяца назад

    Why is it taking several seconds to run the test?

  • @Average_Aoe_Believer
    @Average_Aoe_Believer 4 месяца назад

    Good job man you like actually saved my life (i got an exam tomorrow...)

  • @MuhammadUsman-lp4sm
    @MuhammadUsman-lp4sm 4 месяца назад

    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!

  • @rujor
    @rujor 4 месяца назад

    "Is Ruby on Rails dead? The answer is .." *scrolls*

  • @rubyxfinity8634
    @rubyxfinity8634 4 месяца назад

    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.

  • @Cabugamer
    @Cabugamer 4 месяца назад

    Your videos are amazing, but something that I'm really jealous of is your control of Vim...

  • @abdullahsaleh7196
    @abdullahsaleh7196 4 месяца назад

    keep going