Skip to content

Instantly share code, notes, and snippets.

View Luiyit's full-sized avatar
🏠
Working from home

Luiyit Hernandez Luiyit

🏠
Working from home
View GitHub Profile
@Luiyit
Luiyit / system_test_with_capybara.md
Last active August 12, 2023 01:06
System test with Capybara | Ruby 7 on WSL2

How to fix the error Webdrivers::BrowserNotFound on WSL2

Last update: 11/08/2023.

The error looks like something like this: Failed to determine Chrome binary location. (Webdrivers::BrowserNotFound) Under WSL, we are running the Linux version of Ruby, which won't be able to communicate via WebDriver with the Windows Chrome executable. So, we need to change the default browser driver used by Capybara.

  1. Open the file application_system_test_case.rb inside your rails project, remove the configuration for driven_by and make sure to copy and pase the new driver configuration.
@Luiyit
Luiyit / Local MongoDB + Docker + Prisma.md
Last active November 6, 2025 12:23
Configurate MongoDB with Prisma client

Mongo DB + Prisma

MongoDB is a NoSQL database and Prisma is an ORM for NodeJS. Here are the steps to create a MongoDB database and set up Prisma to use it.

Install MongoDB locally (If you need replica set use docker)

This option works, but you will need to use Docker because prisma needs something called Replica Set.So, the easy way to have it is using docker or creating the database on MongoDB Atlas.

I recommend just to use MongoDB inside a docker container and then connect to it from Prisma.

@Luiyit
Luiyit / firebase-promise-never-resolve.md
Last active December 17, 2024 15:25
React Native database ref set promise never resolves

Packages

"@react-native-firebase/app": "^18.8.0",
"@react-native-firebase/auth": "^18.8.0",
"@react-native-firebase/database": "^18.8.0",

How to replicate it?

import database from '@react-native-firebase/database';
@Luiyit
Luiyit / backend_contract.md
Created September 11, 2024 13:45
Prosegur API contract

Backend Contract

This is the structure that clients need to follow to send and receive data from backend. In the future we will have swagger documentation, but for now you can check this contract rules. The capitalization to use is camel case.

1. Payload [Post & Put]

Always the payload must include a wrapper object called data

` { data: "Object || Array"

@Luiyit
Luiyit / react_native_universal_link.md
Last active December 17, 2024 15:36
React Native - Universal link (iOS) (Dec 2024)