CJ Avilla (cjav_dev)
CJ Avilla (cjav_dev)
  • Видео 337
  • Просмотров 769 522
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 ...
Просмотров: 697

Видео

Basic Posthog API integration - Add A Feature
Просмотров 765Год назад
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
Просмотров 484Год назад
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
Просмотров 212Год назад
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
Просмотров 161Год назад
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
Просмотров 106Год назад
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
Просмотров 152Год назад
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
Просмотров 119Год назад
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
Просмотров 294Год назад
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
Просмотров 241Год назад
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
Просмотров 249Год назад
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
Просмотров 152Год назад
each_cons, and layers 🎂 - Day 09 - Advent of Code 2023
lcm, rotate!, and modulo - Day 08 - Advent of Code 2023
Просмотров 224Год назад
lcm, rotate!, and modulo - Day 08 - Advent of Code 2023
Spaceship operator - Day 07 - Advent of Code 2023
Просмотров 263Год назад
Spaceship operator - Day 07 - Advent of Code 2023
Percent delimiters %w, zip - Day 06 - Advent of Code 2023
Просмотров 182Год назад
Percent delimiters %w, zip - Day 06 - Advent of Code 2023
Range overlap and intersection - Day 05 - Advent of Code
Просмотров 425Год назад
Range overlap and intersection - Day 05 - Advent of Code
Rightward Assignment in Ruby - Day 04 - Advent of Code 2023
Просмотров 425Год назад
Rightward Assignment in Ruby - Day 04 - Advent of Code 2023
Grid of Characters - Day 03 - Advent of Code 2023
Просмотров 497Год назад
Grid of Characters - Day 03 - Advent of Code 2023
Pattern matching with Ranges - Day 02 - Advent of Code 2023
Просмотров 485Год назад
Pattern matching with Ranges - Day 02 - Advent of Code 2023
Match and Scan - Day 01 - Advent of Code 2023
Просмотров 989Год назад
Match and Scan - Day 01 - Advent of Code 2023
Jupyter with Ruby and Rails (plus OpenAI function calling)
Просмотров 948Год назад
Jupyter with Ruby and Rails (plus OpenAI function calling)
Chatbot with Ruby on Rails, Turbo Streams, and OpenAI
Просмотров 4,1 тыс.Год назад
Chatbot with Ruby on Rails, Turbo Streams, and OpenAI
Semantic search (search by meaning) - Rails, OpenAI, langchain.rb, pg_vector
Просмотров 3 тыс.Год назад
Semantic search (search by meaning) - Rails, OpenAI, langchain.rb, pg_vector
Fun with Rails Generators
Просмотров 934Год назад
Fun with Rails Generators
Sales Handoff - Hacking on a handoff process from sales to operations
Просмотров 401Год назад
Sales Handoff - Hacking on a handoff process from sales to operations
Rails Performance Tips and Tricks
Просмотров 2,9 тыс.Год назад
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,2 тыс.Год назад
Using pinecone vector db from Rails with OpenAI for semantic search
Recursively summarize blog posts with OpenAI and Ruby on Rails
Просмотров 1,5 тыс.Год назад
Recursively summarize blog posts with OpenAI and Ruby on Rails
Monkey Math evaluating expressions - Advent of Code 2022 day 21 with Ruby
Просмотров 3142 года назад
Monkey Math evaluating expressions - Advent of Code 2022 day 21 with Ruby

Комментарии

  • @bojanPajovic-g3j
    @bojanPajovic-g3j 5 дней назад

    Thank you!

  • @redabenh3427
    @redabenh3427 6 дней назад

    Hi, very nice tutorial. Still waiting for the next episode, configuring action mailbox in production ?

  • @MMunirAsif
    @MMunirAsif 6 дней назад

    Does this integration works with adaptive pricing, which is newly launched?

  • @nonametrackz7887
    @nonametrackz7887 8 дней назад

    best explanation

  • @eayurt
    @eayurt 19 дней назад

    Thank you very much, my friend. I should have read the guide carefully. 😂

  • @MarquisAldrich
    @MarquisAldrich 20 дней назад

    Hey how long would it take is it difficult

  • @bharatdhaiphule1872
    @bharatdhaiphule1872 25 дней назад

    Is it possible to get relationship between two repositories. A diagram showing tow repositories are using each other

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

    Nice seeing more advanced Rails how-tos. Tired of seeing the same greenfield, blog app.

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

    wow you really helped me with that 👍

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

    Why did you use setInterval? "onmousemove" repeats every "x" miliseconds. (I don' know "x" value. :))

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

    Fast enough that multiple billion dollar startups have built their products on

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

    Tell Twitter that!

    • @Killi-onaire
      @Killi-onaire 5 дней назад

      did you not watch the video? You need to understand that Twitter is an outlier lol. Most applications will not reach that level of traffic.

    • @danh5637
      @danh5637 5 дней назад

      @ sure. But it was a bad idea to make it on rails to begin with

    • @Killi-onaire
      @Killi-onaire 5 дней назад

      @@danh5637 Not based on their originally projected users and traffic. It wasn't meant to be what it is today, but they evolved. It wasn't until they got unexpected growth and experienced extremely high demand during global events that they decided to move from rails. This is exactly how it should work. Develop a product fast, and if the market responds to it (or evolves it, in this case), optimize. Even products developed on other frameworks are not immune to this and may even later switch to a framework that meets their needs. The only constant is change.

    • @danh5637
      @danh5637 5 дней назад

      @ rails was always a bad choice with anything over a hundred users. Rails doesn’t scale. And developer speed and ease shouldn’t be the priority.

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

    Really appreciate this video!! Thank you!!!!🎉

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

    I have done some stuff like this in the past and your explanation is great I love how you have used before_touch which I haven't used before.

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

    any noticed v2 version will be appreciated

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

    RoR jobs are well-paid because there are fewer and fewer resources available on the market. So it’s good when you’re a developer and have a job. If you’re a company, it’s not great. For historical reasons, I code in RoR 7.1, and I understand why this language is gradually disappearing.

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

    Do you plan on implementing edit + destroy actions as well?

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

    Thanks needed this

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

    Your Ruby version is 3.1.2, but your Gemfile specified 3.1.4 I am using windows system how to solve please make separate video

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

      You have two options, try using a version manager to install and manage the different versions you will be using for your projects. Or inside your Gemfile, right at the top, add the line ruby "3.1.2" The "3.1.2" is because of the Ruby version you mentioned. After this, save and run "bundle".

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

    Litttttt❤‍🔥❤‍🔥❤‍🔥❤‍🔥🔥🔥🔥🔥

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

    Ram Ram bhai

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

    That is best!!

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

    HI, how create a URL?

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

    Your content is amazing 🎉

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

    Excellent series! Which is the video where you go over the "magic link"? Thanks!

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

    Awesome men!, thank you, I can improve my code with your explanation.

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

    not working

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

    Awsome!!! If i want to include all the attributes of a model, (example: description, short_description, title, start_date, end_date) to make the chunk, how do you build the chunk that includes all the attrs?. In the video you used the body attr as a chunkable_s. How would you do it for all the attrs?. Thanks

  • @cslab-y8c
    @cslab-y8c 4 месяца назад

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

    Thank you mate, this is awesome great and simple,

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

    thank you definitely passing this part of my trial exam tommorrow

  • @thiagomrvieira
    @thiagomrvieira 5 месяцев назад

    Hey, Nice content. Just moving from Laravel to Rails and it's nice to have content like yours to make this transition smooth. Thank you!

  • @ytvn-nk9nn
    @ytvn-nk9nn 5 месяцев назад

    I tested with a controlled youtube channel, and it seems a lot of messages are missed; have you had this issue?

  • @thundergabriel
    @thundergabriel 5 месяцев назад

    Elixir / Phoenix ❤ is the new rails.

  • @yeinercarvajalquina7727
    @yeinercarvajalquina7727 5 месяцев назад

    You're the best man, thanks!

  • @marcioiherrero
    @marcioiherrero 5 месяцев назад

    Very good, now I understand perfectly how it works by passing a block as a parameter and how it works with parameter in block. The example of the each method illustrated this functionality well, I was wondering how each of the Array and Hash worked behind the scenes. Thank you!

  • @venusMessiah
    @venusMessiah 5 месяцев назад

    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 6 месяцев назад

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

  • @KidUncommon
    @KidUncommon 6 месяцев назад

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

  • @vincentbonnier9333
    @vincentbonnier9333 6 месяцев назад

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

  • @barelycodingtoday
    @barelycodingtoday 6 месяцев назад

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

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

      Thanks for watching!

  • @baylorpate2357
    @baylorpate2357 6 месяцев назад

    Very helpful, thank you!

  • @haniqassim
    @haniqassim 6 месяцев назад

    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 6 месяцев назад

    thanks man!

  • @ErmiaCodev_Fa
    @ErmiaCodev_Fa 6 месяцев назад

    I do Rails, cause I enjoy it❤🌺

  • @djlclopez128
    @djlclopez128 6 месяцев назад

    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 6 месяцев назад

    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 6 месяцев назад

    Awesome!

  • @shashankkestwal4454
    @shashankkestwal4454 6 месяцев назад

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

  • @RiansyahTohamba
    @RiansyahTohamba 6 месяцев назад

    Thanks CJ🎉🎉