Skip to content

Instantly share code, notes, and snippets.

View cmdr-rohit-bang's full-sized avatar
🎯
Focusing

Rohit cmdr-rohit-bang

🎯
Focusing
View GitHub Profile
@cmdr-rohit-bang
cmdr-rohit-bang / recaptcha_integration.md
Last active February 5, 2021 12:21
Using Google reCaptcha in Project

Install this gem in project

gem 'recaptcha', require: 'recaptcha/rails'

Get Recaptcha Pubic and Secret keys from Google Recaptcha Admin and Put the keys vars in your .env file

STRIPE_PUB_KEY='pk_test_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxSTuV'
STRIPE_SEC_KEY='sk_test_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxWXYz'
@cmdr-rohit-bang
cmdr-rohit-bang / User.php
Created June 25, 2022 08:49
/src/Entity/User.php
<?php
// src/Entity/User.php
namespace App\Entity;
use FOS\UserBundle\Model\User as BaseUser;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity
@cmdr-rohit-bang
cmdr-rohit-bang / security.yaml
Created June 25, 2022 08:52
/project/config/packages/security.yaml
# config/packages/security.yaml
security:
encoders:
FOS\UserBundle\Model\UserInterface: bcrypt
role_hierarchy:
ROLE_ADMIN: ROLE_USER
ROLE_SUPER_ADMIN: ROLE_ADMIN
# https://symfony.com/doc/current/security.html#where-do-users-come-from-user-providers
@cmdr-rohit-bang
cmdr-rohit-bang / fos_user.yaml
Created June 25, 2022 08:56
# config/packages/fos_user.yaml
# config/packages/fos_user.yaml
fos_user:
db_driver: orm # other valid values are 'mongodb' and 'couchdb'
firewall_name: main
user_class: App\Entity\User
from_email:
address: "[email protected]"
sender_name: "[email protected]"

1. The Power of Waking Up at 5 AM 🌅

Why Wake Up at 5 AM?

Most high achievers wake up early because the early morning hours are free from distractions and allow for focused personal growth.

Benefits of Waking Up Early

✅ More time for yourself before the world wakes up.
✅ Increased focus, creativity, and productivity.
Less stress and more mental clarity.
✅ Helps build self-discipline and consistency.

Step 1: Check the Installed Versions

First, verify which PostgreSQL versions are installed:

brew list | grep postgresql

Then, check the location of pg_restore:

which pg_restore

And confirm the version it is using: