Skip to content

Instantly share code, notes, and snippets.

@anasmorahhib
anasmorahhib / .env
Last active November 26, 2022 11:48
Docker compose Laravel/MYSQL/Maildev/Apache
DB_CONNECTION=mysql
DB_HOST=db
DB_PORT=3306
DB_DATABASE=prospect_db
DB_USERNAME=user
DB_PASSWORD=password
@anasmorahhib
anasmorahhib / AccessToken.php
Created March 12, 2020 15:43 — forked from onamfc/AccessToken.php
Add Custom Claims to Passport 8 / Laravel 6
<?php
namespace App\Passport;
use App\User;
use Lcobucci\JWT\Builder;
use Lcobucci\JWT\Signer\Key;
use League\OAuth2\Server\CryptKey;
use Lcobucci\JWT\Signer\Rsa\Sha256;
use Laravel\Passport\Bridge\AccessToken as BaseToken;
@anasmorahhib
anasmorahhib / kaggel-dataset-on-colab-and-drive.py
Created December 9, 2019 15:11
Use a kaggle dataset in Colab and Drive
# First go to your Kaggle account and create New API Token, a kaggle.json file will be download.
# Second
# Select the kaggle.json file.
from google.colab import files
files.upload()
# Make sure you have a kaggle.json file.
!ls -lha kaggle.json